/*
 * v4_recorder_module.css
 *
 * SINGLE SOURCE OF TRUTH for greeting / voicemail / pre-alert / TTS / STT
 * recorder UI styling across Auto Attendant, Call Center, Hunt Group,
 * and Extension pages.
 *
 * Loaded globally via main_template_v3.php (after v4_design.css).
 * Pairs with aa_tabs.js normalizer (paints aa-*-normalized classes onto the
 * recorder DOM emitted by shared/templates/recording_module.php).
 *
 * Design tokens (--greeting-*, --aa-recorder-*, etc.) are DEFINED here in
 * § 1 and consumed throughout. Page-specific CSS files MUST NOT declare
 * these tokens or restyle recorder classes. If you find a recorder rule
 * outside this file, move it here.
 *
 * Selector convention: clean. Do NOT chain
 *   body.v4-body #v4-app.v4-app .v4-content .v4-tabbed-detail #foo_app#foo_app
 * to win specificity — there is no competing rule. Keep selectors flat.
 *
 * Class taxonomy (painted by aa_tabs.js and v4_design.js normalizers):
 *   .aa-greeting-area-normalized        — outer recorder shell
 *   .aa-greeting-quick-normalized       — quick recorder block
 *   .aa-selector-normalized             — greeting source dropdown row
 *     + [data-greeting-mode]            — "default" | "edit" | "new" | "rename"
 *   .aa-greeting-controls-normalized    — buttons row under selector
 *   .aa-action-row-normalized           — common action row
 *   .aa-audio-button-aligned            — uniform 34px audio buttons
 *   .aa-vm-recorder-area                — voicemail recorder area
 *   .aa-vm-recorder-selector            — voicemail recorder selector row
 *     + .aa-vm-edit-visible             — when edit affordance is shown
 *   .aa-vm-recorder-controls            — voicemail recorder controls row
 *   .aa-vm-recorder-row                 — voicemail recorder action row
 *   .aa-vm-delivery-row-active          — voicemail delivery email row (grid)
 *   .aa-vm-section, .aa-vm-password-section — voicemail subsections
 *   .vm-setting-row.vm-setting-row-active — generic vm setting row (grid)
 *   .voice_message_email_address_row.aa-vm-email-row-grid — CC/HG email row (Phase 1.5)
 *
 * Sections:
 *   § 1  — Design tokens
 *   § 2  — Greeting area shell
 *   § 3  — Selector dropdown row
 *   § 4  — Quick recorder + audio playback
 *   § 5  — TTS panel
 *   § 6  — STT banner
 *   § 7  — Action row
 *   § 8  — Pre-alert
 *   § 9  — Name recording
 *   § 10 — Voicemail delivery
 *   § 11 — Announcement area
 *   § 12 — Page-specific escape hatches (kept empty by design)
 */


/* ============================================================
 * v4_recorder_module.css
 * § 1 — DESIGN TOKENS (the canonical set)
 * ------------------------------------------------------------
 * Single source of truth for every CSS custom property the
 * greeting / recorder / pre-alert system reads.
 *
 * Token families:
 *   --greeting-*         Canonical greeting layout tokens (v4_2026 era).
 *                        Consumed by the new shared recorder grid.
 *   --aa-greeting-*      Legacy alias family. Still referenced by
 *                        auto_attendant_editable.css consumers. Mapped
 *                        1:1 to the --greeting-* canon below.
 *   --aa-recorder-*      Legacy recorder grid family. Still referenced
 *                        by extension_editable.css consumers (control
 *                        grid math, shared-recorder fallbacks).
 *   --shared-recorder-*  Inner-scope tokens for .shared-recording-selector.
 *                        Resolve to --aa-recorder-* defaults.
 *   --aa-ext-recorder-*  Extension-page pre-alert recorder overrides
 *                        (advanced-notice / pre-alert section only).
 *   --aa-ext-prealert-*  Extension-page pre-alert chrome (borders).
 *   --aa-flat-section-*  Tabbed-detail section chrome.
 *   --aa-elegant-control-* Elegant control chrome (border / text / icon).
 *   --aa-detail-content-* Tabbed-detail max content width.
 *   --vm-selector-*      Voicemail recorder selector width.
 *
 * Per-context overrides at the bottom only where the value
 * GENUINELY differs (AA vs Ext/HG/CC label widths).
 * ============================================================ */

body.v4-body {
    /* ----------------------------------------------------------
     * Canonical greeting tokens (v4_2026.css L1963-L1975)
     * Used by the new shared recorder grid in § 2+.
     * ---------------------------------------------------------- */
    --greeting-label-width: 116px;
    --greeting-grid-gap: 8px;
    --greeting-row-gap: 5px;
    --greeting-control-height: 34px;
    --greeting-button-width: 148px;
    --greeting-select-width: 378px;
    --greeting-default-select-width: 304px;
    --greeting-edit-width: 74px;
    --greeting-button-radius: 7px;
    --greeting-border-color: #D0D7DE;
    --greeting-tts-button-width: 109px;
    --greeting-scope-width: 86px;
    --greeting-action-width: 74px;
    --greeting-cancel-width: 78px;

    /* ----------------------------------------------------------
     * Legacy --aa-greeting-* alias family
     * Auto-attendant editable / inline consumers still reference
     * these names. Map 1:1 to --greeting-* so a single change
     * to the canon above flows everywhere.
     * ---------------------------------------------------------- */
    --aa-greeting-label-width: var(--greeting-label-width);
    --aa-greeting-grid-gap: var(--greeting-grid-gap);
    --aa-greeting-gap: var(--greeting-grid-gap);
    --aa-greeting-row-gap: var(--greeting-row-gap);
    --aa-greeting-button-width: var(--greeting-button-width);
    --aa-greeting-select-width: var(--greeting-select-width);
    --aa-greeting-default-select-width: var(--greeting-default-select-width);
    --aa-greeting-edit-width: var(--greeting-edit-width);
    --aa-greeting-scope-width: var(--greeting-scope-width);
    --aa-greeting-action-width: var(--greeting-action-width);
    --aa-greeting-cancel-width: var(--greeting-cancel-width);
    --aa-greeting-control-width: calc(
        (var(--greeting-button-width) * 3) +
        (var(--greeting-grid-gap) * 2)
    );

    /* ----------------------------------------------------------
     * Legacy --aa-recorder-* family
     * Extension/HG/CC recorder grid still consumes these.
     * All aliased 1:1 to canonical --greeting-* tokens.
     * ---------------------------------------------------------- */
    --aa-recorder-row-label: var(--greeting-label-width);
    --aa-recorder-grid-gap: var(--greeting-grid-gap);
    --aa-recorder-button-width: var(--greeting-button-width);
    --aa-recorder-edit-width: var(--greeting-edit-width);
    --aa-recorder-action-width: 464px;
    --aa-recorder-select-width: var(--greeting-select-width);
    --aa-recorder-control-width: calc(
        (var(--aa-recorder-button-width) * 3) +
        (var(--aa-recorder-grid-gap) * 2)
    );

    /* ----------------------------------------------------------
     * Shared-recorder defaults
     * Inner tokens resolved on .shared-recording-selector and on
     * #extension_app / #call_center_app / #hunt_group_app scopes.
     * ---------------------------------------------------------- */
    --shared-recorder-label-width: var(--greeting-label-width);
    --shared-recorder-select-width: var(--greeting-select-width);
    --shared-recorder-edit-width: var(--greeting-edit-width);
    --shared-recorder-gap: var(--greeting-grid-gap);

    /* ----------------------------------------------------------
     * Extension pre-alert recorder aliases
     * Map 1:1 to --greeting-* so everything is uniform.
     * ---------------------------------------------------------- */
    --aa-ext-recorder-label-width: var(--greeting-label-width);
    --aa-ext-recorder-grid-gap: var(--greeting-grid-gap);
    --aa-ext-recorder-row-gap: var(--greeting-row-gap);
    --aa-ext-recorder-control-height: var(--greeting-control-height);
    --aa-ext-recorder-select-width: var(--greeting-select-width);
    --aa-ext-recorder-default-select-width: var(--greeting-default-select-width);
    --aa-ext-recorder-edit-width: var(--greeting-edit-width);
    --aa-ext-recorder-button-width: var(--greeting-button-width);

    /* ----------------------------------------------------------
     * Extension pre-alert chrome
     * ---------------------------------------------------------- */
    --aa-ext-prealert-border: #DDE7F1;
    --aa-ext-prealert-divider: #E4EBF3;

    /* ----------------------------------------------------------
     * Tabbed-detail / elegant-control chrome
     * ---------------------------------------------------------- */
    --aa-detail-content-width: 1150px;
    --aa-flat-section-border: #DDE7F1;
    --aa-flat-section-radius: 8px;
    --aa-elegant-control-border: #DCE6F1;
    --aa-elegant-control-text: #314860;
    --aa-elegant-control-icon: #7C8FA4;

    /* ----------------------------------------------------------
     * Voicemail selector
     * 304px default — width of the dropdown when in non-edit mode.
     * 378px when edit affordance is shown (.aa-vm-edit-visible).
     * Math: 116px label + 8px gap + 304px select + 8px gap + 70px edit = 506px
     *       (matches the 3-button row: 116 + 3×146.67 + 2×8 = 456 + 70 edit slot)
     * ---------------------------------------------------------- */
    --vm-selector-width: 304px;
}

/* ============================================================
 * Per-context overrides — only where the value genuinely differs
 * ============================================================ */

/* All apps share the same 116px label width from the base token. */

/* Voicemail recorder widens from the default 304px slot to 378px when the
 * edit affordance is visible (matches v4_design.js normalizeVoicemailRecorders). */
body.v4-body .v4-content .aa-vm-recorder-selector.aa-vm-edit-visible {
    --vm-selector-width: 378px;
}


/* ============================================================
 * § 2 — GREETING AREA SHELL
 *
 * The outer flex column wrapping the entire recorder block:
 *   .aa-greeting-area-normalized   (the canonical wrapper used
 *                                   across AA/Ext/HG/CC)
 *   .voicemail-greeting-area       (legacy voicemail wrapper —
 *                                   maps to the same layout)
 *   .aa-unified-shell              (business/after-hours/holiday
 *                                   parent shell)
 *   .greeting / .greeting_super_parent / #voicemail .greeting
 *                                  (legacy single-greeting wrapper
 *                                   inside a recorder block)
 *
 * Token vocabulary used here:
 *   --greeting-row-gap         vertical gap between rows (4px)
 *   --aa-greeting-row-gap      alias for the same (matches § 1)
 *
 * Specificity stripped — no more
 *   `body.v4-body #v4-app.v4-app .v4-content #foo_app#foo_app ...`
 * chains. v4_recorder_module.css loads after the legacy files,
 * so a single class is enough to win.
 * ============================================================ */

/* ============================================================
 * Section header separator (title + subtitle + hairline)
 *
 * Framework pattern: every .aa-subsection-header that contains
 * a .v4-section-desc gets a subtle inset hairline below the
 * subtitle. The line is inset 12px from each edge so it never
 * touches the container border.
 * ============================================================ */
body.v4-body .v4-content .aa-subsection-header .v4-section-desc {
    padding-bottom: 10px;
    margin-bottom: 6px;
    position: relative;
}
body.v4-body .v4-content .aa-subsection-header .v4-section-desc::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 1px;
    background: #E4EBF3;
}

/* Outer wrapper: vertical flow of (selector row, recorder controls). */
body.v4-body .v4-content .voicemail-greeting-area,
body.v4-body .v4-content .aa-greeting-area-normalized {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;  /* children's own margin-top handles row spacing;
                 flex gap + margin doubled it to 10px */
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Inside the voicemail tab the shell gets a soft separator. */
body.v4-body .v4-content #voicemail-tab .aa-greeting-area-normalized,
body.v4-body .v4-content #voicemail .voicemail-greeting-area {
    padding-top: 20px;
    border-top: 1px solid #E4EBF3;
}

/* Generic `.greeting` (legacy single-greeting block inside the
   shell). Trim default padding so the shell controls spacing. */
body.v4-body .v4-content .greeting {
    padding-bottom: 0;
    margin-bottom: 0;
}

body.v4-body .v4-content #voicemail .greeting {
    padding-bottom: 0;
    margin-bottom: 0;
    margin-left: 0;
}

body.v4-body .v4-content #after-hours .greeting,
body.v4-body .v4-content #business .greeting {
    padding-bottom: 0;
    margin-top: 0;
}

/* aa-unified-shell — the bordered container for the entire
   greeting + schedule block on business / after-hours / holiday
   tabs. */
body.v4-body .v4-content .aa-unified-shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

/* Reset inherited padding on greeting section wrapper so all rows
   (Recording, Listen, Create, Voice, Message, Actions) share the
   same left edge.  Matches production master where this is 0.
   Uses ID selectors to beat the #auto_attendant_app .section_item
   rule (specificity 1,1,0) that sets var(--detail-shell-row-padding-x). */
#auto_attendant_app .control_section.greeting,
#hunt_group_app .control_section.greeting,
#call_center_app .control_section.greeting,
#agent_app .control_section.greeting,
body#extension_page .control_section.greeting,
#greetings_app .control_section.greeting {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Override JS inline padding-left:10px on greeting action rows */
#auto_attendant_app .control_section.greeting .greeting-action-row,
#hunt_group_app .control_section.greeting .greeting-action-row,
#call_center_app .control_section.greeting .greeting-action-row,
#agent_app .control_section.greeting .greeting-action-row,
body#extension_page .control_section.greeting .greeting-action-row,
#greetings_app .control_section.greeting .greeting-action-row {
    padding-left: 0 !important;
}

/* Override 18px padding on the anonymous inner wrapper div
   (set by v4_2026.css for CC/HG #announcements context) */
#auto_attendant_app .control_section.greeting > div,
#hunt_group_app .control_section.greeting > div,
#call_center_app .control_section.greeting > div,
#agent_app .control_section.greeting > div,
body#extension_page .control_section.greeting > div,
#greetings_app .control_section.greeting > div {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.v4-body .v4-content .aa-unified-shell > .form-group {
    margin: 0;
    padding: 10px 0;
    border-top: 1px solid var(--v4-border-light);
    background: transparent;
    box-shadow: none;
}

body.v4-body .v4-content .aa-unified-shell > .form-group:first-child {
    border-top: none;
    padding-top: 2px;
}

body.v4-body .v4-content .aa-unified-shell > .form-group + .form-group {
    margin-top: 0;
    padding-top: 10px;
    border-top: 1px solid var(--v4-border-light);
}


/* ============================================================
 * § 3 — SELECTOR DROPDOWN ROW
 *
 * The row of (label + dropdown + edit button) that selects which
 * greeting is being edited. Four modes via [data-greeting-mode]:
 *   default — label + short select
 *   edit    — label + long select + edit-name button
 *   new     — label + long select + add + edit + cancel
 *   rename  — label + name input + add + cancel
 *
 * Selectors:
 *   .aa-selector-normalized        (canonical row, AA family)
 *   .greeting_selector_fixer        (legacy alias)
 *   .shared-recording-selector      (Ext/HG/CC variant)
 *   .greeting-select-dropdown
 *   #greeting_select_dropdown
 *   .greeting_select
 *   .greeting_label  / .greeting-label
 *   .edit_greeting_name
 *   .add_new_greeting
 *   .cancel_new_greeting
 *
 * Token vocabulary used here:
 *   --greeting-label-width            (116px, all apps)
 *   --greeting-grid-gap               (column gap, 8px)
 *   --greeting-control-height         (34px)
 *   --greeting-button-radius          (7px)
 *   --greeting-button-width
 *   --greeting-select-width           (edit/new/rename: 378px)
 *   --greeting-default-select-width   (default mode: 304px)
 *   --greeting-edit-width             (70px)
 *   --greeting-cancel-width
 *   --aa-greeting-label-width         alias
 * ============================================================ */

/* Canonical AA selector row — grid with per-mode column template.
 * :is() with entity IDs gives ID-level specificity (1,0,0) so this
 * beats v4_forms.css  #business .inline_input_row { display:flex !important }
 * and any Bootstrap .d-flex class.  */
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .aa-selector-normalized,
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .greeting_selector_fixer {
    display: grid !important;   /* ID-level specificity beats all flex !important */
    align-items: center;
    justify-content: flex-start;
    gap: var(--greeting-grid-gap);
    width: 100%;
    max-width: 100%;
    min-height: var(--greeting-control-height);
    margin: 0;
    padding: 0;
    position: relative;
}

body.v4-body .v4-content .aa-selector-normalized[data-greeting-mode="default"] {
    grid-template-columns:
        var(--greeting-label-width)
        var(--greeting-default-select-width);
}

body.v4-body .v4-content .aa-selector-normalized[data-greeting-mode="edit"] {
    grid-template-columns:
        var(--greeting-label-width)
        var(--greeting-select-width)
        var(--greeting-edit-width);
}

body.v4-body .v4-content .aa-selector-normalized[data-greeting-mode="new"] {
    grid-template-columns:
        var(--greeting-label-width)
        minmax(180px, var(--greeting-select-width))
        var(--greeting-button-width)
        var(--greeting-edit-width)
        var(--greeting-cancel-width);
}

body.v4-body .v4-content .aa-selector-normalized[data-greeting-mode="rename"] {
    grid-template-columns:
        var(--greeting-label-width)
        minmax(180px, 1fr)
        var(--greeting-edit-width)
        var(--greeting-cancel-width);
}

@media (max-width: 760px) {
    body.v4-body .v4-content .aa-selector-normalized,
body.v4-body .v4-content .aa-selector-normalized[data-greeting-mode] {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Shared-recording-selector — Ext/HG/CC variant of the selector
   row. Used when the recording library is shared rather than
   per-context. */
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .shared-recording-selector {
    --shared-recorder-label-width: var(--greeting-label-width);
    --shared-recorder-select-width: var(--greeting-select-width);
    --shared-recorder-edit-width: var(--greeting-edit-width);
    --shared-recorder-gap: var(--greeting-grid-gap);

    display: grid !important;   /* ID-level specificity beats all flex !important */
    grid-template-columns:
        var(--shared-recorder-label-width)
        minmax(260px, var(--shared-recorder-select-width))
        var(--shared-recorder-edit-width)
        auto auto;
    column-gap: var(--shared-recorder-gap);
    row-gap: var(--shared-recorder-gap);
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
}

body.v4-body .v4-content .shared-recording-selector > .hidden {
    display: none !important;
}

@media (max-width: 760px) {
    body.v4-body .v4-content .shared-recording-selector {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Label cell — column 1 in every mode. */
body.v4-body .v4-content .greeting_label,
body.v4-body .v4-content .aa-selector-normalized > .greeting_label,
body.v4-body .v4-content .shared-recording-selector > .greeting_label {
    grid-column: 1 / 2;
    flex: 0 0 auto;
    display: flex !important;
    align-items: center !important;
    align-self: center;
    width: var(--greeting-label-width);
    min-width: var(--greeting-label-width);
    height: var(--greeting-control-height);
    margin: 0 !important;
    padding: 0;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: none;
    color: var(--v4-text-muted);
}

/* Shared variant uses a different visual style ("Recording"
   eyebrow rendered via ::after). */
body.v4-body .v4-content .shared-recording-selector > .greeting_label {
    font-size: 0;
    font-weight: 600;
    color: #1B3557;
    text-transform: none;
    letter-spacing: 0;
}

body.v4-body .v4-content .shared-recording-selector > .greeting_label::after {
    content: "";
    font-size: 13px;
}

/* Dropdown — column 2 across all modes. */
body.v4-body .v4-content #greeting_select_dropdown,
body.v4-body .v4-content .greeting-select-dropdown,
body.v4-body .v4-content .aa-selector-normalized select#greeting_select_dropdown:not(.hidden),
body.v4-body .v4-content .shared-recording-selector > select#greeting_select_dropdown {
    display: block;
    grid-column: 2 / 3;
    flex: 0 1 auto;
    height: var(--greeting-control-height);
    min-height: var(--greeting-control-height);
    line-height: var(--greeting-control-height);
    margin: 0;
    padding: 0 30px 0 12px;
    border: 1px solid var(--greeting-border-color);
    border-radius: var(--greeting-button-radius);
    background-color: #FFFFFF;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7A90' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--v4-navy);
    min-width: 220px;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

body.v4-body .v4-content #greeting_select_dropdown:focus,
body.v4-body .v4-content .greeting-select-dropdown:focus {
    outline: none;
    border-color: var(--greeting-border-color);
    box-shadow: none;
}

/* Default-mode dropdown has a fixed shorter width. */
body.v4-body .v4-content .aa-selector-normalized[data-greeting-mode="default"] select#greeting_select_dropdown {
    width: var(--greeting-default-select-width);
    min-width: var(--greeting-default-select-width);
    max-width: var(--greeting-default-select-width);
}

/* Edit / new / rename: dropdown fills its grid cell. */
body.v4-body .v4-content .aa-selector-normalized:not([data-greeting-mode="default"]) select#greeting_select_dropdown {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

body.v4-body .v4-content .aa-selector-normalized select#greeting_select_dropdown.hidden {
    display: none !important;
}

/* Rename-mode replaces the select with a text input. */
body.v4-body .v4-content .aa-selector-normalized input[name="add_new_greeting_input"]:not(.hidden) {
    display: block;
    grid-column: 2 / 3;
    flex: 0 1 auto;
    height: var(--greeting-control-height);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--greeting-border-color);
    border-radius: var(--greeting-button-radius);
    background: #FFFFFF;
}

body.v4-body .v4-content .aa-selector-normalized input[name="add_new_greeting_input"].hidden {
    display: none !important;
}

/* New-mode "kind of greeting" select sits at column 3. */
body.v4-body .v4-content .aa-selector-normalized select[name="add_new_greeting_select"]:not(.hidden) {
    display: block;
    grid-column: 3 / 4;
    flex: 0 1 auto;
    height: var(--greeting-control-height);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    border: 1px solid var(--greeting-border-color);
    border-radius: var(--greeting-button-radius);
}

body.v4-body .v4-content .aa-selector-normalized select[name="add_new_greeting_select"].hidden {
    display: none !important;
}

/* ----- Edit / Save / Cancel buttons in the selector row ----- */

/* Base pill style shared across the greeting/menu control buttons.
 * ID-via-:is() gives (1,x,x) specificity to beat v4_forms.css
 * .btn height:38px/padding:9px 18px !important declarations. */
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .spinner_button,
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .cancel_new_greeting,
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .add_new_greeting,
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .edit_greeting_name,
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .edit_greeting,
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .secondary-play > .btn,
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .secondary-pause,
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .secondary-stop {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: var(--greeting-control-height) !important;
    min-height: var(--greeting-control-height) !important;
    max-height: var(--greeting-control-height) !important;
    padding: 0 12px !important;
    border: 1px solid var(--greeting-border-color) !important;
    border-radius: var(--greeting-button-radius) !important;
    background: #FFFFFF !important;
    color: var(--v4-text-secondary) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    box-shadow: none !important;
    transition: background-color .15s ease, border-color .15s ease,
                color .15s ease !important;
}

/* Menu key Play/Stop buttons — more prominent than standard greeting controls
   so the row doesn't look empty when a greeting is assigned. */
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .secondary-play > .btn.aa-menu-play-btn,
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .btn.aa-menu-stop-btn {
    color: #0E2749 !important;
    font-weight: 600 !important;
    border-color: #C6D3E1 !important;
    box-shadow: 0 1px 2px rgba(14, 39, 73, 0.06) !important;
    width: 100% !important;
    max-width: none !important;
}

/* Edit-name button — "rename" pencil pill. */
body.v4-body .v4-content .edit_greeting_name {
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    width: var(--greeting-edit-width);
    min-width: var(--greeting-edit-width);
    max-width: var(--greeting-edit-width);
    padding: 0 8px;
    font-size: 12.5px;
    gap: 7px;
}

body.v4-body .v4-content .edit_greeting_name:hover {
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
    border-color: var(--v4-brand-light);
}

body.v4-body .v4-content .edit_greeting_name i {
    font-size: 11px;
    opacity: 0.85;
}

body.v4-body .v4-content .edit_greeting_name img {
    height: 14px;
    width: auto;
}

/* Grid placement varies by mode. */
body.v4-body .v4-content .aa-selector-normalized[data-greeting-mode="new"] .edit_greeting_name {
    grid-column: 4 / 5;
}

body.v4-body .v4-content .aa-selector-normalized:not([data-greeting-mode="new"]) .edit_greeting_name {
    grid-column: 3 / 4;
}

body.v4-body .v4-content .aa-selector-normalized .edit_greeting_name.hidden,
body.v4-body .v4-content .shared-recording-selector .edit_greeting_name.hidden {
    display: none !important;
}

/* Add-new (Save) button. */
body.v4-body .v4-content .add_new_greeting {
    flex: 0 1 auto;
    width: 100%;
    font-size: 13.5px;
    padding: 0 8px;
}

body.v4-body .v4-content .add_new_greeting img {
    height: 18px;
    margin: 0;
}

body.v4-body .v4-content .aa-selector-normalized[data-greeting-mode="rename"] .add_new_greeting {
    grid-column: 3 / 4;
}

body.v4-body .v4-content .aa-selector-normalized:not([data-greeting-mode="rename"]) .add_new_greeting {
    grid-column: 4 / 5;
}

body.v4-body .v4-content .aa-selector-normalized .add_new_greeting.hidden {
    display: none !important;
}

/* Cancel button. */
body.v4-body .v4-content .cancel_new_greeting {
    flex: 0 1 auto;
    width: 100%;
    font-size: 13.5px;
    padding: 0 8px;
}

body.v4-body .v4-content .cancel_new_greeting img {
    height: 18px;
    margin: 0;
}

body.v4-body .v4-content .aa-selector-normalized[data-greeting-mode="rename"] .cancel_new_greeting {
    grid-column: 4 / 5;
}

body.v4-body .v4-content .aa-selector-normalized:not([data-greeting-mode="rename"]) .cancel_new_greeting {
    grid-column: 5 / 6;
}

body.v4-body .v4-content .aa-selector-normalized .cancel_new_greeting.hidden {
    display: none !important;
}

/* Inline edit-text label (shared-recording-selector). */
body.v4-body .v4-content .shared-recording-selector .aa-greeting-edit-text {
    margin-left: 6px;
}


/* ============================================================
 * § 4 — QUICK RECORDER + AUDIO PLAYBACK
 *
 * The horizontal row of audio controls beneath the selector row:
 *   Listen / Re-record / Upload / Download / TTS
 *
 * Selectors:
 *   .aa-greeting-quick-normalized   (canonical AA quick recorder)
 *   .aa-greeting-controls-normalized (controls wrapper)
 *   .aa-action-row-normalized        (single button row)
 *   .aa-vm-recorder-area / -selector / -controls / -row
 *                                    (voicemail recorder variant)
 *   .recorder-area, .recorder-action-row (legacy aliases — not
 *                                          present in raw extract
 *                                          but kept in scope per
 *                                          spec for future markup)
 *   .aa-audio-button-aligned         (34px-height audio button)
 *   .download_link, .play-loader, .download_spinner
 *   .spinner_button (in recorder context)
 *
 * Token vocabulary used here:
 *   --greeting-control-height       (34px)
 *   --greeting-grid-gap             (8-10px)
 *   --greeting-row-gap              (4px)
 *   --greeting-label-width
 *   --greeting-button-width         (~148px)
 *   --greeting-button-radius        (7px)
 *   --aa-recorder-row-label         (aliased to --greeting-label-width)
 *   --aa-recorder-button-width      (aliased to --greeting-button-width)
 *   --aa-recorder-grid-gap          (aliased to --greeting-grid-gap)
 *   --aa-recorder-edit-width        (aliased to --greeting-edit-width)
 * ============================================================ */

/* ---------- Quick recorder wrapper ---------- */

body.v4-body .v4-content .aa-greeting-quick-normalized {
    display: block;
    flex: 0 0 auto;
    order: 1;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    position: static;
}

body.v4-body .v4-content .aa-greeting-controls-normalized {
    flex: 0 0 auto;
    order: 2;
    width: 100%;
    margin: 0;
    padding: 0;
    position: static;
}

/* ---------- The 3-button audio row ---------- */
/* (Listen / Re-record / Upload OR TTS / Cancel / Save) */

body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .aa-action-row-normalized:not(.hidden) {
    display: grid !important;   /* ID-level specificity beats all flex !important */
    align-items: center;
    grid-template-columns:
        var(--greeting-label-width)
        repeat(3, var(--greeting-button-width));
    column-gap: var(--greeting-grid-gap);
    row-gap: var(--greeting-row-gap);
    min-height: var(--greeting-control-height);
    width: 100%;
    padding: 0;
    border: 0;
}

body.v4-body .v4-content .aa-action-row-normalized.hidden {
    display: none !important;
}

body.v4-body .v4-content .aa-action-row-normalized[data-container_name="upload_options"] {
    margin: var(--greeting-row-gap) 0 0;
}

body.v4-body .v4-content .aa-action-row-normalized:not([data-container_name="upload_options"]) {
    margin: 0;
}

body.v4-body .v4-content .aa-action-row-normalized > .greeting_label {
    grid-column: 1 / 2;
    flex: 0 0 auto;
    width: auto;
    height: var(--greeting-control-height);
    line-height: var(--greeting-control-height);
    margin: 0 !important;
    font-size: 13px;
}

/* Action-row labels: let the PHP-rendered text show through.
 * The label base style (13px, 700 weight) from .aa-action-row-normalized
 * > .greeting_label applies. No text-replacement needed. */

@media (max-width: 760px) {
    body.v4-body .v4-content .aa-action-row-normalized:not(.hidden) {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Audio button (Listen / Re-record / Upload / TTS) ---------- */
/* 34px-height pill, used in every audio row. */

body.v4-body .v4-content .aa-audio-button-aligned,

body.v4-body .v4-content .aa-action-row-normalized .btn.tts-btn,

body.v4-body .v4-content .aa-action-row-normalized .download_link .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: var(--greeting-control-height) !important;
    min-height: var(--greeting-control-height) !important;
    padding: 0 7px !important;
    margin: 0 !important;
    border: 1px solid var(--greeting-border-color) !important;
    border-radius: var(--greeting-button-radius) !important;
    background: #FFFFFF !important;
    color: var(--v4-text-secondary) !important;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    transition: background-color .15s ease, border-color .15s ease,
                color .15s ease, box-shadow .15s ease !important;
}

body.v4-body .v4-content .aa-audio-button-aligned i,
body.v4-body .v4-content .aa-action-row-normalized .btn.tts-btn i,
body.v4-body .v4-content .aa-action-row-normalized .download_link .btn i {
    flex: 0 0 auto;
    width: auto;
    margin: 0 4px 0 0;
    font-size: 12px;
    line-height: 1;
    opacity: 0.75;
}

body.v4-body .v4-content .aa-audio-button-aligned:hover:not(.disabled),
body.v4-body .v4-content .aa-action-row-normalized .btn.tts-btn:hover:not(.disabled) {
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
    border-color: var(--v4-brand-light);
}

body.v4-body .v4-content .aa-audio-button-aligned:hover:not(.disabled) i,
body.v4-body .v4-content .aa-action-row-normalized .btn.tts-btn:hover:not(.disabled) i {
    opacity: 1;
}

/* Active / playing state — fill with brand. */
body.v4-body .v4-content .aa-audio-button-aligned.active,
body.v4-body .v4-content .aa-action-row-normalized .tts-btn.play.active {
    background: var(--v4-brand);
    color: #FFFFFF;
    border-color: var(--v4-brand);
}

/* Record-dot in the Re-record button. */
body.v4-body .v4-content .aa-audio-button-aligned .fa-circle,
body.v4-body .v4-content .aa-action-row-normalized .tts-btn .fa-circle {
    color: var(--v4-red);
    font-size: 8px;
    opacity: 1;
}

/* ---------- Download link / spinner ---------- */

body.v4-body .v4-content .greeting .download_link,
body.v4-body .v4-content .announcement_controls .download_link,
body.v4-body .v4-content .announcement-area .download_link,
body.v4-body .v4-content .aa-action-row-normalized .download_link {
    display: inline-flex;
    align-items: center;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    text-decoration: none;
    box-shadow: none;
}

body.v4-body .v4-content .greeting .download_link:hover,
body.v4-body .v4-content .announcement_controls .download_link:hover,
body.v4-body .v4-content .announcement-area .download_link:hover,
body.v4-body .v4-content .aa-action-row-normalized .download_link:hover {
    background: transparent;
    text-decoration: none;
}

body.v4-body .v4-content .download_spinner button {
    width: 104px;
    padding: 2px 11px;
}

body.v4-body .v4-content .download_spinner button img {
    margin-right: 6px;
    height: 17px;
}

/* ---------- Play loader (spinning icon inside Listen) ---------- */


body.v4-body .v4-content .play-loader button {
    width: 59px;
}

@keyframes spin-animation {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(359deg); }
}

/* ---------- Voicemail recorder variant ---------- */
/* These three classes scope the same layout to the voicemail tab
   (different label width and select width than the main AA
   greeting selector). */

body.v4-body .v4-content .aa-vm-recorder-area {
    display: flex;
    flex-direction: column;
    gap: 0;
    row-gap: 0;
}

body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .aa-vm-recorder-selector {
    display: grid !important;   /* ID-level specificity beats all flex !important */
    grid-template-columns:
        116px
        var(--vm-selector-width)
        var(--greeting-edit-width);
    column-gap: var(--greeting-grid-gap);
    align-items: center;
    justify-content: flex-start;
    height: var(--greeting-control-height);
    min-height: var(--greeting-control-height);
    max-height: var(--greeting-control-height);
    margin: 0;
    padding: 0;
}

/* Edit-visible variant: widens the dropdown to 378px (matches edit affordance space) */
body.v4-body .v4-content .aa-vm-recorder-selector.aa-vm-edit-visible {
    --vm-selector-width: 378px;
}

/* Same widening keyed off the pencil's ACTUAL visibility. The
 * .aa-vm-edit-visible class is only computed once at page load
 * (v4_design.js normalizeVoicemailRecorders), so when the pencil
 * appears dynamically — picking a recording that was "None" at
 * load, or right after Apply on a new recording — the class is
 * stale and the 376px dropdown overlapped the pencil's 74px cell. */
body.v4-body .v4-content .aa-vm-recorder-selector:has(> .edit_greeting_name:not(.hidden)) {
    --vm-selector-width: 378px;
}

body.v4-body .v4-content .aa-vm-recorder-selector > .greeting_label {
    height: var(--greeting-control-height);
    line-height: var(--greeting-control-height);
}

body.v4-body .v4-content .aa-vm-recorder-selector select#greeting_select_dropdown {
    grid-column: 2 / 3;
    height: var(--greeting-control-height);
    min-height: var(--greeting-control-height);
    width: var(--vm-selector-width);
    min-width: var(--vm-selector-width);
    max-width: var(--vm-selector-width);
}

/* .aa-vm-recorder-controls — wraps the action rows below the selector.
 * 5px uniform row rhythm (Recording / Listen / Create / STT panel all 5px apart). */
body.v4-body .v4-content .aa-vm-recorder-controls {
    margin: 5px 0 0;
    padding: 0;
    gap: 5px;
    row-gap: 5px;
}

/* .aa-vm-recorder-row — 3-button action rows under the recorder.
 * 116px label + 3 × 146.67px buttons (math: 116 + 3×146.67 + 2×8 = 456px wide). */
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .aa-vm-recorder-row:not(.hidden) {
    display: grid !important;   /* ID-level specificity beats all flex !important */
    grid-template-columns: 116px repeat(3, 146.67px);
    column-gap: var(--greeting-grid-gap);
    align-items: center;
    height: var(--greeting-control-height);
    min-height: var(--greeting-control-height);
    max-height: var(--greeting-control-height);
    margin: 0;
    padding: 0;
}

/* The row grows for a Play / Download status line (§ 7,
 * .greeting_action_status), a second grid row under the buttons;
 * pinned at one line it spilled over the next card. */
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .aa-vm-recorder-row:not(.hidden):has(> .greeting_action_status:not(.hidden)) {
    height: auto;
    max-height: none;
}

body.v4-body .v4-content .aa-vm-recorder-row.hidden {
    display: none !important;
}

body.v4-body .v4-content .aa-vm-recorder-row:not(.hidden) button.btn.tts-btn {
    height: var(--greeting-control-height);
    min-height: var(--greeting-control-height);
    width: 100%;
}


/* ============================================================
 * § 5 — TTS PANEL (text-to-speech)
 * ------------------------------------------------------------
 * The text-to-speech input UI. A panel that opens inside a
 * .greeting_container[data-container_name="text-to-speech"] and
 * lays out three rows:
 *
 *   Row 1: Voice picker      (Voice / select / play / pause)
 *   Row 2: Message textarea  (Message / .text_to_convert)
 *   Row 3: Action row        (Format / Preview / Convert / Cancel)
 *
 * The action row uses CSS order to enforce a stable visual sequence
 * regardless of DOM insertion order: format_text_ai → tts_preview_play
 * /pause → convert_text_to_audio / .uploading → cancel_text_to_audio.
 *
 * Source-of-truth declarations:
 *   - v4_2026.css L2769-L2802    canonical tts-btn shape
 *   - v4_2026.css L2961-L2976    textarea.text_to_convert
 *   - v4_2026.css L3326-L3343    textarea sizing consolidation
 *   - v4_2026.css L2834-L2844    convert_text_to_audio primary CTA
 *   - v4_forms.css L2364-L2467   per-app action-row order + sizing
 *   - extension_editable.css L10152-L10209  flex action-row layout
 *   - auto_attendant_editable.css L3974-L4043  AA-greeting variant
 * ============================================================ */

/* ----------------------------------------------------------
 * Panel container — text-to-speech greeting container reset.
 * Strips inherited card chrome so the panel sits flush inside
 * the surrounding greeting block.
 * ---------------------------------------------------------- */
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"]:not(.hidden) {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

/* Keep TTS panel hidden while STT is still processing.
 * The Listen row (.stt_spinner visible) is a sibling of the
 * TTS container — once the spinner disappears (result ready),
 * the panel appears with the result already populated. */
body.v4-body .v4-content [data-container_name="actions"]:has(.stt_spinner:not(.hidden)) ~ .greeting_container[data-container_name="text-to-speech"] {
    display: none !important;
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] > div:not(.stt-result-banner):not(.greeting-state-banner),
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .greeting_contents,
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .greeting_content {
    margin-left: 0 !important;
    padding-left: 0 !important;
    width: 100%;
    max-width: 100%;
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .hidden,
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .tts-action-row.hidden {
    display: none !important;
}

/* The TTS form table — strip any cascading border / padding so the
 * three internal rows align cleanly against the panel edge. */
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .greeting_parent[data-greeting="text_to_speech"] > .flex_table {
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .stt-result-banner + .greeting_parent[data-greeting="text_to_speech"] > .flex_table {
    margin-top: 5px;
}

/* ----------------------------------------------------------
 * Row layout — voice-row, has-row-label (message), tts-action-row
 * all share the same two-column grid: label slot + content slot.
 * Label width comes from --greeting-label-width (116px).
 * ---------------------------------------------------------- */
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .has-row-label,
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .greeting_contents.has-row-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--greeting-grid-gap);
    padding-top: 0;
    margin-top: var(--greeting-row-gap) !important;
    margin-bottom: var(--greeting-row-gap) !important;
    border-top: none;
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .has-row-label > .greeting_label,
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .tts-action-row > .greeting_label,
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .tts-settings-panel > .greeting_label,
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .voice-row > .greeting_label {
    flex: 0 0 var(--greeting-label-width);
    display: flex !important;
    align-items: center !important;
    width: var(--greeting-label-width);
    min-width: var(--greeting-label-width);
    max-width: var(--greeting-label-width);
    height: var(--greeting-control-height);
    padding: 0;
    margin: 0 !important;
    align-self: center;
    text-align: left;
    color: #536984;
    font-size: 13px;
    font-weight: 700;
}

/* Message row: textarea gets the remaining column. */
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .has-row-label > .text_to_convert {
    flex: 1 1 auto;
    align-self: start;
    /* width / max-width / min-height live on textarea.text_to_convert below */
}

/* Voice row sits between voice-picker controls in column 2. */
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .voice-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--greeting-grid-gap);
    width: 100%;
    max-width: 100%;
    margin: var(--greeting-row-gap) 0 0;
}

/* ----------------------------------------------------------
 * .text_to_convert — the TTS message textarea
 * Capped at 540px so the panel doesn't stretch indefinitely on
 * wide screens. resize: vertical only — users can grow the box
 * but not push it sideways into the action column.
 * ---------------------------------------------------------- */
body.v4-body .v4-content textarea.text_to_convert {
    width: 100%;
    max-width: 540px;
    min-height: 84px;
    height: auto;
    padding: 10px 14px;
    border: 1px solid var(--greeting-border-color);
    border-radius: var(--greeting-button-radius) !important;
    background: #FFFFFF;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--v4-navy);
    resize: vertical;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

body.v4-body .v4-content textarea.text_to_convert:focus {
    outline: none;
    border-color: var(--greeting-border-color);
    box-shadow: none;
}

body.v4-body .v4-content textarea.text_to_convert::placeholder {
    color: var(--v4-text-faint);
    font-weight: 400;
}

/* ----------------------------------------------------------
 * .tts-action-row — bottom action strip (Format / Preview /
 * Convert / Cancel). Hidden when empty; otherwise a horizontal
 * flex row that aligns its buttons to the start of column 2.
 * ---------------------------------------------------------- */
body.v4-body .v4-content .tts-action-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: var(--greeting-grid-gap);
    margin: var(--greeting-row-gap) 0 0;
    padding: 0;
    width: auto;
}

body.v4-body .v4-content .tts-action-row.hidden,
body.v4-body .v4-content .tts-action-row.announcement_controls.hidden {
    display: none !important;
}

/* Stable visual order regardless of DOM sequence */
body.v4-body .v4-content .tts-action-row .format_text_ai {
    order: 1;
}

body.v4-body .v4-content .tts-action-row :is(.tts_preview_play, .tts_preview_pause) {
    order: 2;
}

body.v4-body .v4-content .tts-action-row :is(.convert_text_to_audio, .uploading) {
    order: 3;
}

body.v4-body .v4-content .tts-action-row .cancel_text_to_audio {
    order: 4;
}

/* Hide internal toggle states (button.uploading.hidden, etc.) */
body.v4-body .v4-content .tts-action-row button.btn.tts-btn.hidden,
body.v4-body .v4-content .tts-action-row button.uploading.hidden,
body.v4-body .v4-content .tts-action-row .btn.hidden,
body.v4-body .v4-content .tts-action-row .uploading.hidden,
body.v4-body .v4-content .tts-action-row .tts_preview_pause.hidden {
    display: none !important;
    visibility: hidden !important;
}

/* Cancel button stays visible when the row is open */
body.v4-body .v4-content .tts-action-row:not(.hidden) button.cancel_text_to_audio {
    display: inline-flex !important;
    visibility: visible !important;
}

/* ----------------------------------------------------------
 * .tts-btn — TTS row buttons (Format, Preview, Convert, Cancel)
 * Fixed-width pill controls. 108-px width keeps four buttons in
 * a row at standard panel widths.
 * ---------------------------------------------------------- */
body.v4-body .v4-content .tts-action-row button.btn.tts-btn,
body.v4-body .v4-content .tts-action-row .tts-btn,
body.v4-body .v4-content .tts-action-row .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 var(--greeting-tts-button-width);
    width: var(--greeting-tts-button-width);
    min-width: var(--greeting-tts-button-width);
    max-width: var(--greeting-tts-button-width);
    height: var(--greeting-control-height);
    min-height: var(--greeting-control-height);
    padding: 0 12px;
    margin: 0;
    gap: var(--greeting-grid-gap);
    border: 1px solid var(--greeting-border-color);
    border-radius: var(--greeting-button-radius);
    background: #FFFFFF;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--v4-text-secondary);
    box-shadow: none;
    white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease,
                color .15s ease, box-shadow .15s ease;
}

body.v4-body .v4-content .tts-btn {
    transition: background-color 0.15s ease, color 0.15s ease,
                box-shadow 0.15s ease, border-color 0.15s ease;
}

/* Inline icon inside any tts button */
body.v4-body .v4-content .tts-action-row .btn.tts-btn i,
body.v4-body .v4-content .tts-action-row .btn i,
body.v4-body .v4-content .tts-btn i {
    flex: 0 0 auto;
    width: auto;
    margin-right: 4px;
    margin-left: 0;
    font-size: 12px;
    line-height: 1;
    opacity: 0.75;
}

/* Hover — generic tts-btn (not the orange Convert CTA, not the Cancel) */
body.v4-body .v4-content .tts-btn:hover:not(.disabled):not(.convert_text_to_audio):not(.cancel) {
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
    border-color: var(--v4-brand-light);
}

body.v4-body .v4-content .tts-btn:hover:not(.disabled) i {
    opacity: 1;
}

/* Disabled state */
body.v4-body .v4-content .tts-btn.disabled {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: none;
}

/* Record-state indicator dot inside the button */
body.v4-body .v4-content .tts-btn .fa-circle {
    color: var(--v4-red);
    font-size: 8px;
    opacity: 1;
}

/* Playing state — when preview audio is active */
body.v4-body .v4-content .tts-btn.play.active {
    background: var(--v4-brand);
    color: #FFFFFF;
    border-color: var(--v4-brand);
}

/* ----------------------------------------------------------
 * .convert_text_to_audio — the primary CTA in the TTS row.
 * Solid brand orange, white text, soft brand-glow shadow.
 * This is the button users click to generate the audio.
 * ---------------------------------------------------------- */
body.v4-body .v4-content .tts-btn.convert_text_to_audio:not(.disabled),
body.v4-body .v4-content .tts-action-row .convert_text_to_audio:not(.disabled) {
    background: var(--v4-brand);
    color: #FFFFFF;
    border-color: var(--v4-brand);
    box-shadow: 0 1px 2px rgba(248, 153, 57, 0.18);
    font-weight: 600;
}

body.v4-body .v4-content .tts-btn.convert_text_to_audio:not(.disabled) i,
body.v4-body .v4-content .tts-action-row .convert_text_to_audio:not(.disabled) i {
    color: inherit;
    opacity: 0.75;
}

body.v4-body .v4-content .tts-btn.convert_text_to_audio:not(.disabled):hover,
body.v4-body .v4-content .tts-action-row .convert_text_to_audio:not(.disabled):hover {
    background: var(--v4-brand-hover);
    border-color: var(--v4-brand-hover);
    box-shadow: 0 6px 14px -4px var(--v4-brand-glow);
    transform: translateY(-1px);
}

/* ----------------------------------------------------------
 * .cancel_text_to_audio — secondary, ghost button.
 * Visible only while a conversion is in flight; transparent
 * until hovered.
 * ---------------------------------------------------------- */
body.v4-body .v4-content .tts-btn.cancel,
body.v4-body .v4-content .tts-action-row .cancel_text_to_audio {
    background: transparent;
    border-color: transparent;
    color: var(--v4-text-muted);
}

body.v4-body .v4-content .tts-btn.cancel:hover,
body.v4-body .v4-content .tts-action-row .cancel_text_to_audio:hover {
    background: var(--v4-inset-soft);
    color: var(--v4-navy);
    border-color: transparent;
}

/* ----------------------------------------------------------
 * .speech_to_text_toggler — the toggle button that opens /
 * closes the TTS panel from the greeting row. Just strip the
 * default border so it sits cleanly next to the other actions.
 * ---------------------------------------------------------- */
body.v4-body .v4-content .speech_to_text_toggler button {
    border: none !important;
}

/* ============================================================
 * § 6 — STT BANNER (speech-to-text result)
 * ------------------------------------------------------------
 * After a TTS preview is generated (or after a recording is
 * transcribed), the .stt-result-banner shows the transcribed
 * text above the panel. It's a soft warm-toned strip that sits
 * flush with the textarea below (matching its 540-px cap).
 *
 * The .stt_spinner is the in-flight loader button shown while
 * speech-to-text is still processing.
 *
 * Source-of-truth declarations:
 *   - v4_2026.css L3026-L3036   stt-result-banner inside TTS panel
 *   - v4_2026.css L3458-L3480   per-app stt-result-banner sizing
 *   - extension_editable.css L318-L326  stt_spinner button + img
 * ============================================================ */

/* ----------------------------------------------------------
 * .stt-result-banner — the blue / warm-toned result strip
 * shown inside the TTS container after a preview is generated.
 * Indented to align with the textarea below (label width plus
 * grid gap), capped at the same 540-px width.
 * ---------------------------------------------------------- */
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .stt-result-banner,
body.v4-body .v4-content .stt-result-banner {
    box-sizing: border-box;
    margin-top: var(--greeting-row-gap) !important;
    margin-right: 0;
    margin-bottom: 5px;
    margin-left: calc(var(--greeting-label-width) + var(--greeting-grid-gap));
    /* Match the textarea width exactly: 540 px or fits the remaining
       row width, whichever is smaller. */
    width: min(540px, calc(100% - var(--greeting-label-width) - var(--greeting-grid-gap)));
    max-width: min(540px, calc(100% - var(--greeting-label-width) - var(--greeting-grid-gap)));
    padding: 12px 16px 13px;
    border: none;
    border-radius: var(--greeting-button-radius);
    box-shadow: inset 0 0 0 1px #F2DDB8;
}

/* When the banner sits above the form, push the form down a bit
 * and add a thin top divider to separate the two sections. */
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .stt-result-banner + .greeting_parent {
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid var(--v4-border-light);
}

/* ----------------------------------------------------------
 * .stt_spinner — the loader button shown while speech-to-text
 * is still running. Fixed 134-px width so the row layout
 * doesn't reflow when the spinner appears.
 * ---------------------------------------------------------- */
body.v4-body .v4-content .stt_spinner button {
    padding: 2px 11px !important;
    width: 134px !important;
}

body.v4-body .v4-content .stt_spinner button img {
    margin-right: 8px;
    height: 17px !important;
}

/* Pin the STT spinner and Close toggle to grid column 4 so they
 * never overflow the 4-column action row onto a second line.
 * During STT processing both .stt_spinner and .speech_to_text_toggler
 * can be visible at the same time — forcing them into the same
 * column keeps the row stable. */
body.v4-body .v4-content .greeting-action-row > .stt_spinner:not(.hidden) {
    grid-column: 4;
    grid-row: 1;
    width: 148px !important;
    max-width: 148px;
}
body.v4-body .v4-content .greeting-action-row > .speech_to_text_toggler:not(.hidden) {
    grid-column: 4;
    grid-row: 1;
    width: 148px !important;
    max-width: 148px;
}


/* ============================================================
 * v4_recorder_module.css
 * § 7 — ACTION ROW (common buttons under the recorder)
 * § 8 — PRE-ALERT (announcement controls)
 * § 9 — NAME RECORDING (the user's name recorder)
 * ------------------------------------------------------------
 * Output of canonicalisation pass over raw_extract.css.
 * Specificity scoping (body.v4-body, #v4-app, doubled-IDs,
 * .v4-tabbed-detail prefixes) stripped — the file is loaded
 * inside body.v4-body so the chain is redundant. Redundant
 * !important dropped where the rule no longer competes
 * against legacy cascades. Tokens used wherever values match.
 * ============================================================ */


/* ============================================================
 * § 7 — ACTION ROW
 * ------------------------------------------------------------
 * Common buttons row under the recorder: Save, Cancel, Listen,
 * Download, etc. Covers .greeting-action-row (the canonical
 * name), .action_row / .action-row legacy aliases, and
 * .menu_key_greeting_controls (the per-key controls inside
 * menu cells).
 * ============================================================ */

/* ----- Base row layout (grid form, on by default) ---------- */
body.v4-body .v4-content .greeting-action-row,
body.v4-body .v4-content .greeting_container:not(.hidden) {
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}

body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .greeting-action-row[data-container_name]:not(.hidden) {
    display: grid !important;
    grid-template-columns: var(--greeting-label-width) repeat(3, var(--greeting-button-width)) !important;
    column-gap: var(--greeting-grid-gap) !important;
    row-gap: var(--greeting-row-gap) !important;
    gap: var(--greeting-grid-gap) !important;
    align-items: center !important;
    min-height: var(--greeting-control-height) !important;
    margin: var(--greeting-row-gap) 0 0 !important;
    padding: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.v4-body .v4-content .greeting-action-row > * {
    margin-left: 0;
    margin-right: 0;
}

body.v4-body .v4-content .greeting-action-row[data-container_name] > * {
    margin-left: 0;
    margin-right: 0;
}

/* Hidden row collapses completely so it doesn't eat vertical
 * space in the layout. */
body.v4-body .v4-content .greeting-action-row.hidden {
    display: none;
    margin: 0;
    height: 0;
    padding: 0;
}

body.v4-body .v4-content .greeting-action-row > a.hidden,
body.v4-body .v4-content .greeting-action-row > div.hidden,
body.v4-body .v4-content .greeting-action-row .btn.hidden,
body.v4-body .v4-content .greeting-action-row > .hidden {
    display: none !important;
    visibility: hidden !important;
}
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .greeting-action-row .hidden,
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .greeting-action-row a.hidden,
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .announcement_controls .hidden,
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .announcement_controls a.hidden {
    display: none !important;
    visibility: hidden !important;
}

/* What Play or Download could not do: its own line under the buttons,
 * spanning the button columns of the action grid (greeting.js
 * vtGreetingActionStatus, 2026-09-24; the voicemail recorder row grows
 * for it, § 4 .aa-vm-recorder-row). The row's ancestors set line-height
 * 0, so the line sets its own. */
body.v4-body .v4-content .announcement_controls > .greeting_action_status {
    grid-column: 2 / -1;
    align-self: center;
    margin: 0;
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    color: #B91C1C;
}

body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .aa-action-row-normalized:not(.hidden) {
    display: grid !important;   /* ID-level specificity beats all flex !important */
    grid-template-columns: var(--greeting-label-width) repeat(3, var(--greeting-button-width));
    column-gap: var(--greeting-grid-gap);
    row-gap: var(--greeting-row-gap);
    align-items: center;
    min-height: var(--greeting-control-height);
    border: 0;
    padding: 0;
    width: 100%;
}

body.v4-body .v4-content .aa-action-row-normalized[data-container_name="upload_options"] {
    margin: var(--greeting-row-gap) 0 0;
}

body.v4-body .v4-content .aa-action-row-normalized:not([data-container_name="upload_options"]) {
    margin: 0;
}

body.v4-body .v4-content .aa-action-row-normalized.hidden {
    display: none;
}

/* Adjacent action rows: small vertical separator gap */
body.v4-body .v4-content .greeting-action-row + .greeting-action-row {
    margin-top: var(--greeting-row-gap);
}

/* Areas (business/after/holiday/submenu/greeting_container)
 * normalize action-row block min-height to match control height. */
body.v4-body .v4-content [id$="_app"] .business_hours_greeting_area .greeting-action-row,
body.v4-body .v4-content [id$="_app"] .after_hours_greeting_area .greeting-action-row,
body.v4-body .v4-content [id$="_app"] .holiday_hours_greeting_area .greeting-action-row,
body.v4-body .v4-content [id$="_app"] .greeting_container .greeting-action-row,
body.v4-body .v4-content [id$="_app"] .greeting_container .tts-action-row {
    align-items: center;
    min-height: var(--greeting-control-height);
}

/* Action row inner-row gaps (group is one of: announcement_controls
 * wrapper, actions row, upload_options row, or the TTS action row). */
body.v4-body .v4-content .greeting-action-row .announcement_controls,
body.v4-body .v4-content .greeting-action-row[data-container_name="actions"],
body.v4-body .v4-content .greeting-action-row[data-container_name="upload_options"],
body.v4-body .v4-content .tts-action-row {
    gap: var(--greeting-grid-gap);
}

/* Name-area (the row that pairs Name input + Save / Cancel) is a
 * tighter 4-column grid: label, name input, Save, Cancel. */
body.v4-body .v4-content .greeting-action-row.name-area,
body.v4-body .v4-content .control_section.greeting > .greeting-action-row:first-of-type:not([data-container_name]) {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .greeting-action-row.name-area:not(.hidden) {
    display: grid !important;   /* ID-level specificity beats all flex !important */
    grid-template-columns: var(--greeting-label-width) 200px var(--greeting-action-width) var(--greeting-cancel-width);
    column-gap: var(--greeting-grid-gap);
    align-items: center;
    min-height: var(--greeting-control-height);
    margin: var(--greeting-row-gap) 0 0;
    padding: 0;
}

body.v4-body .v4-content .greeting-action-row.name-area > * {
    margin-left: 0;
    margin-right: 0;
}

body.v4-body .v4-content .greeting-action-row.name-area .greeting_name {
    width: 200px;
    flex: 0 0 200px;
    height: var(--greeting-control-height);
    min-height: var(--greeting-control-height);
    max-height: var(--greeting-control-height);
    line-height: 32px;
    padding-top: 0;
    padding-bottom: 0;
    border-color: var(--aa-elegant-control-border);
    border-radius: var(--greeting-button-radius);
    box-shadow: none;
}

body.v4-body .v4-content .greeting-action-row.name-area :is(.add_new_greeting:not(.hidden), .cancel_new_greeting:not(.hidden)) {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--greeting-control-height);
    min-height: var(--greeting-control-height);
    line-height: 32px;
    padding: 0 12px;
    margin: 0;
    background: #FFFFFF;
    border: 1px solid var(--aa-elegant-control-border);
    border-radius: var(--greeting-button-radius);
    color: var(--aa-elegant-control-text);
    font-size: 13px;
    font-weight: 700;
}

/* Action-row children: grid items fill their column cell.
 * CRITICAL: a:not(.hidden) — JS adds .hidden to the Speech-to-Text
 * <a> wrapper during STT processing. Without :not(.hidden), the
 * hidden anchor still gets display:inline-flex and occupies a grid
 * cell, pushing the row to 76 px (two rows) instead of 34 px. */
body.v4-body .v4-content .greeting-action-row[data-container_name] > :is(a:not(.hidden), div.uploading:not(.hidden), div.play-loader:not(.hidden), div.download_spinner:not(.hidden), div.stt_spinner:not(.hidden)),
body.v4-body .v4-content .greeting-action-row[data-container_name] > a:not(.hidden) {
    display: inline-flex;
    align-items: center;
    margin: 0;
    width: 100%;
    min-width: 0;
}

/* Action-row labels (Listen, Create, etc.)
 * display:flex + align-items:center beats the global
 * v4_forms.css label { line-height:1.4 !important } rule
 * that otherwise top-aligns text inside the 34px box. */
body.v4-body .v4-content [id$="_app"] .greeting-action-row > .greeting_label {
    grid-column: 1 / 2;
    flex: 0 0 var(--greeting-label-width);
    display: flex !important;
    align-items: center !important;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--v4-text-muted);
    width: var(--greeting-label-width);
    min-width: var(--greeting-label-width);
    max-width: var(--greeting-label-width);
    align-self: center;
    height: var(--greeting-control-height);
    margin: 0 !important;
}

body.v4-body .v4-content .aa-action-row-normalized > .greeting_label {
    grid-column: 1 / 2;
    flex: 0 0 auto;
    display: flex !important;
    align-items: center !important;
    font-size: 13px;
    height: var(--greeting-control-height);
    margin: 0;
    width: auto;
}

/* Action-row buttons (tts-btn / download_link / btn variants) —
 * uniform 34px-height rounded-rect, brand-soft hover.
 * !important on layout props to beat inline styles and competing cascades. */
body.v4-body .v4-content .greeting-action-row .btn.tts-btn,
body.v4-body .v4-content .greeting-action-row .download_link .btn,
body.v4-body .v4-content .tts-action-row .btn.tts-btn,
body.v4-body .v4-content .announcement_controls .btn.tts-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    height: var(--greeting-control-height) !important;
    min-height: var(--greeting-control-height) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 7px !important;
    margin: 0 !important;
    background: #FFFFFF !important;
    border: 1px solid var(--greeting-border-color) !important;
    border-radius: var(--greeting-button-radius) !important;
    box-shadow: none !important;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--v4-text-secondary) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    transition: background-color .15s ease, border-color .15s ease,
                color .15s ease, box-shadow .15s ease !important;
}

body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .greeting-action-row a:not(.hidden),
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .greeting-action-row a:not(.hidden):hover,
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .tts-action-row a:not(.hidden),
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .tts-action-row a:not(.hidden):hover,
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .announcement_controls a:not(.hidden),
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .announcement_controls a:not(.hidden):hover {
    display: flex !important;
    align-items: center !important;
    height: var(--greeting-control-height) !important;
    line-height: 1 !important;
    border-bottom: none !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.v4-body .v4-content .greeting-action-row .btn.tts-btn i,
body.v4-body .v4-content .greeting-action-row .download_link .btn i,
body.v4-body .v4-content .tts-action-row .btn.tts-btn i,
body.v4-body .v4-content .announcement_controls .btn.tts-btn i {
    flex: 0 0 auto;
    font-size: 12px;
    line-height: 1;
    opacity: 0.75;
    margin-right: 4px;
    margin-left: 0;
    width: auto;
}

/* Hidden state visibility lock for spinner/action wrappers */
body.v4-body .v4-content .greeting-action-row .btn.hidden,
body.v4-body .v4-content .greeting-action-row a.hidden {
    display: none;
}

/* ----- menu_key_greeting_controls (per-key inline controls) -- */
/* Single column: only one button (Play OR Stop) is visible at a time,
   so the visible button fills the full width of the cell.           */
body.v4-body .v4-content .business_menu_container .menu_key_greeting_controls,
body.v4-body .v4-content .after_menu_container .menu_key_greeting_controls,
body.v4-body .v4-content .holiday_menu_container .menu_key_greeting_controls,
body.v4-body .v4-content #submenu [id$="_table"] .menu_key_greeting_controls {
    display: inline-grid;
    grid-template-columns: 1fr;
    grid-auto-flow: column;
    align-items: center;
    gap: 6px;
    min-height: 34px;
}

body.v4-body .v4-content #auto_attendant_app .menu_key_greeting_controls {
    display: inline-grid;
    grid-template-columns: 1fr;
    grid-auto-flow: column;
    align-items: center;
    gap: 6px;
}

body.v4-body .v4-content #auto_attendant_app .menu_key_greeting_controls > *,
body.v4-body .v4-content #auto_attendant_app .menu_key_greeting_controls > a > .btn {
    margin: 0;
}


body.v4-body .v4-content .menu_key_greeting_controls a:not(.hidden) {
    display: inline-flex;
}

body.v4-body .v4-content .menu_key_greeting_controls .hidden,
body.v4-body .v4-content .menu_key_greeting_controls a.hidden,
body.v4-body .v4-content .menu_key_greeting_controls .btn.hidden {
    display: none;
}

/* ----- @ narrow viewport: collapse rows to single column ----- */
@media (max-width: 760px) {
    body.v4-body .v4-content .aa-action-row-normalized:not(.hidden),
body.v4-body .v4-content .greeting-action-row[data-container_name]:not(.hidden),
body.v4-body .v4-content .greeting-action-row.name-area:not(.hidden) {
        grid-template-columns: minmax(0, 1fr);
        flex-wrap: wrap;
    }

    body.v4-body .v4-content .greeting-action-row[data-container_name] :is(.btn.tts-btn, .download_link .btn, .spinner_button) {
        max-width: 100%;
        min-width: 0;
        width: 100%;
    }
}

/* ============================================================
 * § 8 — PRE-ALERT (announcement controls)
 * ------------------------------------------------------------
 * The Pre-alert pane houses an announcement recorder (its own
 * recording-selector and action-row variant). Pre-alert SCHEDULE
 * containers (.pre_alert_content_section subsection wrappers,
 * schedule criteria list, "+" add-criteria button) are schedule
 * logic and live in the schedule module — explicitly NOT in
 * this file.
 *
 * Tokens consumed:
 *   --aa-ext-recorder-* family (extension pre-alert overrides)
 *   --aa-ext-prealert-* family (chrome borders)
 *   --greeting-* family (general action-row sizing)
 * ============================================================ */


/* ----- Section header / title / desc ----------------------------
   The feature-card header (title, description, divider, the bare and
   collapsed states) is ONE class-based rule set in entity_shared.css
   ("FEATURE CARD HEADER"). The id-list copy that lived here until
   2026-09-15 left every newer card (AI answering, International
   Calling, Calling Line ID Override) on Bootstrap's raw 28px h3. Do
   not restate it here. */

/* ----- Feature info icon + collapsible panel -------------------- */
body.v4-body .v4-content .aa-feature-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9CA3AF;
    cursor: pointer;
    transition: color 0.15s;
    flex-shrink: 0;
}
body.v4-body .v4-content .aa-feature-info-btn:hover {
    color: #0E2749;
}
body.v4-body .v4-content .aa-feature-info-panel {
    padding: 10px 16px 12px;
    border-top: 1px solid #F0F1F4;
}
body.v4-body .v4-content .aa-feature-info-panel.info-collapsed {
    display: none;
}
body.v4-body .v4-content .aa-feature-info-content {
    font-size: 13px;
    color: #6B7F97;
    line-height: 1.6;
}
body.v4-body .v4-content .aa-feature-info-content p {
    margin: 0 0 6px;
}
body.v4-body .v4-content .aa-feature-info-content p:last-child {
    margin-bottom: 0;
}
body.v4-body .v4-content .aa-feature-info-content .aa-feature-info-title {
    margin-bottom: 8px;
    font-weight: 600;
    color: #0F1729;
}

/* ----- Pre-alert content / layout / sections -------------------- */
body.v4-body .v4-content #pre-alert .pre_alert_content_section {
    display: block;
    margin: 0;
    padding: 0;
}

body.v4-body .v4-content #pre-alert .aa-prealert-layout {
    display: block;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
}

body.v4-body .v4-content #pre-alert .aa-prealert-section {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

body.v4-body .v4-content #pre-alert .aa-prealert-section + .aa-prealert-section {
    border-top: 1px solid var(--aa-ext-prealert-divider) !important;
    margin-top: 18px !important;
    padding-top: 18px !important;
}

body.v4-body .v4-content #pre-alert .aa-prealert-section > .aa-subsection-header {
    background: transparent;
    border: 0;
    margin: 0 0 10px;
    padding: 0;
}

body.v4-body .v4-content #pre-alert .aa-prealert-section .aa-inline-subsection-title label {
    color: #0F1729;
    font: 750 16px/1.3 "Plus Jakarta Sans", system-ui, sans-serif;
    letter-spacing: 0;
    margin: 0;
    padding: 0;
}


/* ----- Pre-alert announcement / schedule cards ----------------- */
body.v4-body .v4-content #pre-alert :is(.aa-prealert-announcement-card, .aa-prealert-schedule-card, .aa-embedded-announcement) {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    gap: 0;        /* kill flex gap from .aa-greeting-area-normalized (5px);
                      children's own margin-top handles row spacing */
    margin: 0;
    padding: 0;
    width: 100%;
}

body.v4-body .v4-content #pre-alert .aa-prealert-announcement-card :is(.control_section.greeting, .control_section.greeting > div, .greeting_content) {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Grid removed: display:grid prevented margin-collapse, doubling
   the Recording→Listen gap to 10px (Open tab has 5px).
   Children's own margin-top: 5px handles row spacing in block flow. */

/* ----- Pre-alert recording selector (shared-recording-selector
 *       scoped inside #pre-alert; full visual override here) ---- */
body.v4-body .v4-content #pre-alert .shared-recording-selector.greeting_selector_fixer {
    display: grid !important;   /* !important beats Bootstrap .d-flex */
    grid-template-columns: var(--aa-ext-recorder-label-width)
                           var(--aa-ext-recorder-select-width)
                           var(--aa-ext-recorder-edit-width);
    column-gap: var(--aa-ext-recorder-grid-gap);
    row-gap: var(--aa-ext-recorder-row-gap);
    align-items: center;
    justify-content: flex-start;
    background: transparent;
    border: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

body.v4-body .v4-content #pre-alert .shared-recording-selector.greeting_selector_fixer:has(.edit_greeting_name.hidden) {
    grid-template-columns: var(--aa-ext-recorder-label-width)
                           var(--aa-ext-recorder-default-select-width);
}

body.v4-body .v4-content #pre-alert .shared-recording-selector.greeting_selector_fixer > .hidden,
body.v4-body .v4-content #pre-alert .greeting-action-row > .hidden,
body.v4-body .v4-content #pre-alert .greeting-action-row > a.hidden {
    display: none;
    visibility: hidden;
}

/* Pre-alert recorder labels — keep the slot but replace text via
 * pseudo-element to force the consistent Recording / Listen /
 * Create wording. */
body.v4-body .v4-content #pre-alert .shared-recording-selector.greeting_selector_fixer > .greeting_label,
body.v4-body .v4-content #pre-alert .greeting-action-row > .greeting_label {
    display: flex;
    grid-column: 1 / 2;
    color: transparent;
    font-size: 0;
    margin: 0;
    min-width: 0;
    padding: 0;
    width: auto;
}

body.v4-body .v4-content #pre-alert .shared-recording-selector.greeting_selector_fixer > .greeting_label::after,
body.v4-body .v4-content #pre-alert .greeting-action-row > .greeting_label::after {
    display: inline-flex;
    align-items: center;
    color: #52677F;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0;
}

body.v4-body .v4-content #pre-alert .shared-recording-selector.greeting_selector_fixer > .greeting_label::after {
    content: "";
}

body.v4-body .v4-content #pre-alert .greeting-action-row[data-container_name="actions"] > .greeting_label::after {
    content: "";
}

body.v4-body .v4-content #pre-alert .greeting-action-row[data-container_name="upload_options"] > .greeting_label::after {
    content: "";
}

/* Pre-alert select / input / edit_greeting_name / add+cancel
 * pills (matches the design-token-driven button height) */
body.v4-body .v4-content #pre-alert .shared-recording-selector.greeting_selector_fixer > :is(select#greeting_select_dropdown, input[name="add_new_greeting_input"]),
body.v4-body .v4-content #pre-alert .shared-recording-selector.greeting_selector_fixer > .edit_greeting_name,
body.v4-body .v4-content #pre-alert .shared-recording-selector.greeting_selector_fixer > :is(.add_new_greeting, .cancel_new_greeting):not(.hidden) {
    display: inline-flex;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #C6D3E1;
    border-radius: var(--greeting-button-radius);
    box-shadow: none;
    color: #153354;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    margin: 0;
}

body.v4-body .v4-content #pre-alert .shared-recording-selector.greeting_selector_fixer > select#greeting_select_dropdown:not(.hidden),
body.v4-body .v4-content #pre-alert .shared-recording-selector.greeting_selector_fixer > input[name="add_new_greeting_input"]:not(.hidden) {
    grid-column: 2 / 3;
    justify-content: flex-start;
    max-width: 100%;
    min-width: 0;
    padding: 0 34px 0 14px;
    width: 100%;
}

body.v4-body .v4-content #pre-alert .shared-recording-selector.greeting_selector_fixer:has(.edit_greeting_name.hidden) > select#greeting_select_dropdown:not(.hidden) {
    width: var(--aa-ext-recorder-default-select-width);
}

body.v4-body .v4-content #pre-alert .shared-recording-selector.greeting_selector_fixer > .edit_greeting_name:not(.hidden) {
    grid-column: 3 / 4;
    justify-content: center;
    max-width: var(--aa-ext-recorder-edit-width);
    min-width: var(--aa-ext-recorder-edit-width);
    padding: 0 8px;
    width: var(--aa-ext-recorder-edit-width);
}

/* ----- Pre-alert action row (Listen / Create / Download row) --- */
body.v4-body .v4-content #pre-alert .greeting-action-row:not(.hidden),
body.v4-body .v4-content #pre-alert .announcement_controls.greeting-action-row:not(.hidden) {
    display: grid !important;   /* !important beats Bootstrap .d-flex */
    grid-template-columns: var(--aa-ext-recorder-label-width)
                           repeat(3, var(--aa-ext-recorder-button-width));
    column-gap: var(--aa-ext-recorder-grid-gap);
    row-gap: var(--aa-ext-recorder-row-gap);
    align-items: center;
    justify-content: flex-start;
    background: transparent;
    border: 0;
    box-shadow: none;
    margin: 0;
    max-width: 100%;
    padding: 0;
    width: 100%;
}

body.v4-body .v4-content #pre-alert .control_section.greeting .greeting-action-row + .greeting-action-row {
    margin-top: var(--aa-ext-recorder-row-gap);
}

body.v4-body .v4-content #pre-alert .greeting-action-row > :is(a, .download_spinner, .stt_spinner, .speech_to_text_toggler, .tts_trigger, .play-loader):not(.hidden) {
    margin: 0;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

/* Pre-alert action-row buttons (pill style w/ filled bg) */
body.v4-body .v4-content #pre-alert .greeting-action-row[data-container_name] :is(button.btn.tts-btn, .download_link .btn, .download_link button.btn, .tts_trigger button.btn.tts-btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: 1px solid #C6D3E1;
    border-radius: var(--greeting-button-radius);
    box-shadow: none;
    color: #153354;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    max-width: 100%;
    min-width: 0;
    padding: 0 12px;
    width: 100%;
}

body.v4-body .v4-content #pre-alert .greeting-action-row[data-container_name] :is(button.btn.tts-btn, .download_link .btn, .download_link button.btn, .tts_trigger button.btn.tts-btn) i,
body.v4-body .v4-content #pre-alert .greeting-action-row[data-container_name] :is(button.btn.tts-btn, .download_link .btn, .download_link button.btn, .tts_trigger button.btn.tts-btn) svg {
    flex: 0 0 auto;
    margin-right: 6px;
}

/* Pre-alert action row when used in admin pages: AA-style label
 * width (116px label slot, 146px buttons). */
body.v4-body .v4-content #pre-alert .greeting-action-row > label.greeting_label {
    font-size: 0;
    color: transparent;
    width: 116px;
    min-width: 116px;
    flex: 0 0 116px;
    padding: 0;
    margin: 0 !important;
}

body.v4-body .v4-content #pre-alert .greeting-action-row.announcement_controls > label.greeting_label::before {
    content: "";
    display: inline-block;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1B3557;
}

body.v4-body .v4-content #pre-alert .greeting-action-row:has(.upload_new_greeting) > label.greeting_label::before {
    content: "";
    display: inline-block;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1B3557;
}

body.v4-body .v4-content #pre-alert .greeting-action-row .btn.tts-btn:not(.spinner_button):not(.hidden):not(.tts-btn-sm),
body.v4-body .v4-content #pre-alert .greeting-action-row .tts_trigger {
    min-width: 146px;
    width: 146px;
}

body.v4-body .v4-content #pre-alert .greeting-action-row > a:not(.hidden) {
    width: 146px;
    min-width: 146px;
    max-width: 146px;
    box-sizing: border-box;
}

/* Pre-alert action-row flex fallback (legacy markup safety net) */
body.v4-body .v4-content #pre-alert .greeting-action-row {
    display: flex;
    grid-template-columns: none;
    gap: 12px;
    column-gap: 12px;
    align-items: center;
    margin: 0;
    padding: 0;
}

body.v4-body .v4-content #pre-alert .greeting-action-row + .greeting-action-row {
    margin-top: 2px;
}

body.v4-body .v4-content #pre-alert #greeting_select_dropdown {
    margin-left: 0;
}

/* AA pre-alert control section (announcement card body): align
 * top, full-width, kill the legacy left margin pull-in. */
body.v4-body .v4-content #auto_attendant_app #pre-alert .control_section.greeting {
    align-items: flex-start;
}

body.v4-body .v4-content #auto_attendant_app #pre-alert .control_section.greeting > div {
    width: 100%;
    margin-left: 0;
}

body.v4-body .v4-content #auto_attendant_app #pre-alert .control_section.greeting .greeting-action-row {
    justify-content: flex-start;
}

body.v4-body .v4-content #auto_attendant_app #pre-alert .control_section.greeting .greeting_label {
    min-width: 90px;
    text-align: left;
}

/* Drop the legacy label pseudo-elements inside pre-alert (we set
 * our own ::before/::after content above). */
body.v4-body .v4-content #auto_attendant_app #pre-alert .greeting-action-row > .greeting_label::before,
body.v4-body .v4-content #auto_attendant_app #pre-alert .greeting-action-row > .greeting_label::after,
body.v4-body .v4-content #auto_attendant_app #pre-alert .shared-recording-selector > .greeting_label::before,
body.v4-body .v4-content #auto_attendant_app #pre-alert .shared-recording-selector > .greeting_label::after,
body.v4-body .v4-content #auto_attendant_app .aa-prealert-announcement-card .greeting-action-row > .greeting_label::before,
body.v4-body .v4-content #auto_attendant_app .aa-prealert-announcement-card .greeting-action-row > .greeting_label::after,
body.v4-body .v4-content #auto_attendant_app .aa-prealert-announcement-card .shared-recording-selector > .greeting_label::before,
body.v4-body .v4-content #auto_attendant_app .aa-prealert-announcement-card .shared-recording-selector > .greeting_label::after {
    content: "";
    display: none;
}


/* ============================================================
 * § 9 — NAME RECORDING (the user's name recorder)
 * ------------------------------------------------------------
 * Voicemail name recording is a tiny dedicated recorder pane
 * inside #voicemail (Ext/HG/CC). The .aa-vm-static-name-recording
 * variant strips the toggle and keeps the recorder always-on
 * (the feature can't actually be disabled at the BroadWorks
 * layer). The block lives below the main greeting recorder.
 *
 * Selectors covered here are name-recording specific. The
 * shared .greeting-action-row.name-area row (which holds the
 * Name input + Save/Cancel) lives in § 7 because it's reused
 * across greeting types.
 * ============================================================ */

/* The name-recording content block inside #voicemail */
body.v4-body .v4-content :is(#extension_app, #call_center_app, #hunt_group_app, #agent_app) #voicemail #name-recording-content {
    width: 100%;
    max-width: 100%;
    margin: 14px 0 0;
    padding: 20px 0 0;
}

/* Static (always-on) variant: hide the toggle controls, force
 * the section visible. */
body.v4-body .v4-content .aa-vm-static-name-recording .aa-section-toggle {
    display: none;
}

body.v4-body .v4-content .aa-vm-static-name-recording [data-arrow-toggle-disabled] {
    cursor: default;
}

body.v4-body .v4-content .aa-vm-static-name-recording input[name="name_recording_enabled"],
body.v4-body .v4-content .aa-vm-static-name-recording .aa-subsection-header img {
    display: none;
}

/* Per-area "name-area" .btn.hidden lock — keep hidden buttons
 * fully out of the flow so the row doesn't tower over the
 * Save / Cancel pair. */
body.v4-body .v4-content .name-area .btn.hidden {
    display: none;
}

body.v4-body .v4-content .name-area .add_new_greeting,
body.v4-body .v4-content .name-area .cancel_new_greeting {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* ============================================================
 * v4_recorder_module.css
 * § 10 — VOICEMAIL DELIVERY (email forward, transfer-on-0)
 * ------------------------------------------------------------
 * Voicemail Delivery sub-row family inside #voicemail-tab:
 *   - .voice_message_email_address_row  (delivery wrapper)
 *   - .voice_message_notify_email       (notify-by-email toggle row)
 *   - .voice_message_carbon_copy        (carbon-copy toggle row)
 *   - .voice_message_transfer           (transfer-on-0 toggle row)
 *   - .vm-setting-area / .vm-setting-row (generic VM setting rows)
 *   - .vm-delivery-row-active           (JS-applied active class)
 *   - .vm-setting-row-active            (JS-applied active class)
 *   - .vm-conditional-input             (conditional email/phone input)
 *
 * Painter-replacement notes:
 *   .voice_message_email_address_row.aa-vm-email-row-grid is a new
 *   class introduced in Phase 2.5 to replace inline style.setProperty
 *   calls in call_center.js:2623-2627 and hunt_group.js:2630-2634.
 *   The matching rule is at the bottom of this section.
 *
 *   .voice_message_email_address_row.vm-email-grid-active already
 *   exists as a JS-toggled marker in v4_2026.css (kept verbatim).
 * ============================================================ */

/* ------------------------------------------------------------
 * Generic .vm-setting-area / .vm-setting-row layout
 *   Default flex row, label on left, control on right.
 *   Overridden to grid in scoped contexts below.
 * ------------------------------------------------------------ */
body.v4-body .v4-content .vm-setting-area {
    margin-left: -10px;
}

body.v4-body .v4-content .vm-setting-area,
body.v4-body .v4-content .vm-setting-area div,
body.v4-body .v4-content .vm-setting-area label {
    line-height: 30px;
}

body.v4-body .v4-content .vm-setting-row {
    display: flex;
}

body.v4-body .v4-content .vm-setting-row div:first-child {
    width: 200px;
}

body.v4-body .v4-content .vm-setting-row div:nth-child(2) {
    min-width: 50px;
    margin-left: 10px;
    display: flex;
    width: 120px;
}

body.v4-body .v4-content .vm-setting-row div:last-child {
    margin-left: 10px;
}

body.v4-body .v4-content .vm-setting-row div:last-child input[type='checkbox'] {
    display: none;
}

/* ------------------------------------------------------------
 * .voice_mail_container .vm-setting-area / .vm-setting-row
 *   Scoped grid layout for the voicemail container in
 *   Extension / Hunt Group / Call Center voicemail tabs.
 *   AA scope included separately (block layout via aa-vm-section).
 * ------------------------------------------------------------ */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #call_center_app, #hunt_group_app, #agent_app) .voice_mail_container .vm-setting-area {
    margin-top: 14px;
    padding-top: 20px;
    /* border-top killed: the .v4-section-desc::after 480px divider provides
       the visual separator. The full-width border-top was a conflicting line. */
    border-top: 0;
}

body.v4-body .v4-content :is(#extension_app, #call_center_app, #hunt_group_app, #agent_app) .voice_mail_container .vm-setting-row {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    display: grid;
    grid-template-columns: minmax(210px, 260px) minmax(260px, 420px) minmax(0, 1fr) auto;
    column-gap: 12px;
    align-items: center;
    margin: 0;
    padding: 4px 0;
    border: 0;
    background: transparent;
}

body.v4-body .v4-content :is(#extension_app, #call_center_app, #hunt_group_app, #agent_app) .voice_mail_container .vm-setting-row + .vm-setting-row {
    border-top: 1px solid #E8EEF5;
}

body.v4-body .v4-content :is(#extension_app, #call_center_app, #hunt_group_app, #agent_app) .voice_mail_container .vm-setting-row > div {
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body.v4-body .v4-content :is(#extension_app, #call_center_app, #hunt_group_app, #agent_app) .voice_mail_container .vm-setting-row > div:empty,
body.v4-body .v4-content :is(#extension_app, #call_center_app, #hunt_group_app, #agent_app) .voice_mail_container .vm-setting-row .error_message:empty {
    display: none;
}

body.v4-body .v4-content :is(#extension_app, #call_center_app, #hunt_group_app, #agent_app) .voice_mail_container .vm-setting-row label.label {
    margin: 0;
    color: #314860;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

body.v4-body .v4-content :is(#extension_app, #call_center_app, #hunt_group_app, #agent_app) .voice_mail_container .vm-setting-row input.form-control,
body.v4-body .v4-content :is(#extension_app, #call_center_app, #hunt_group_app, #agent_app) .voice_mail_container .vm-setting-row select.form-control {
    width: min(100%, 420px);
    max-width: 100%;
}

body.v4-body .v4-content :is(#extension_app, #call_center_app, #hunt_group_app, #agent_app) .voice_mail_container .vm-setting-row .switch {
    justify-self: end;
}


/* ------------------------------------------------------------
 * Auto-attendant #voicemail .aa-vm-section nested row rhythm
 *   AA voicemail uses per-section bordered cards (Pass 36ac).
 * ------------------------------------------------------------ */
body.v4-body .v4-content #auto_attendant_app #advanced .aa-vm-section .vm-setting-area {
    margin-top: 6px;
}

body.v4-body .v4-content #auto_attendant_app #advanced .aa-vm-section .vm-setting-row {
    padding: 10px 0;
    margin: 0;
    border-top: 1px solid var(--v4-border-light);
}

body.v4-body .v4-content #auto_attendant_app #advanced .aa-vm-section .vm-setting-row:first-of-type {
    border-top: 0;
    padding-top: 0;
}

body.v4-body .v4-content #auto_attendant_app #advanced .aa-vm-section .vm-setting-row:last-of-type {
    padding-bottom: 0;
}

/* ------------------------------------------------------------
 * Extension/HG/CC #voicemail .aa-vm-section nested rhythm
 *   Extension/HG/CC version of the AA aa-vm-section spacing
 *   from extension_editable.css L7368-L7391.
 * ------------------------------------------------------------ */
body.v4-body .v4-content :is(#extension_app, #call_center_app, #hunt_group_app, #agent_app) #voicemail .aa-vm-section .vm-setting-area {
    margin-top: 6px;
}

body.v4-body .v4-content :is(#extension_app, #call_center_app, #hunt_group_app, #agent_app) #voicemail .aa-vm-section .vm-setting-row {
    padding: 10px 0;
    margin: 0;
    border-top: 1px solid var(--v4-border-light);
}

body.v4-body .v4-content :is(#extension_app, #call_center_app, #hunt_group_app, #agent_app) #voicemail .aa-vm-section .vm-setting-row:first-of-type {
    border-top: 0;
    padding-top: 0;
}

body.v4-body .v4-content :is(#extension_app, #call_center_app, #hunt_group_app, #agent_app) #voicemail .aa-vm-section .vm-setting-row:last-of-type {
    padding-bottom: 0;
}


/* ------------------------------------------------------------
 * § 10 (supplement) — Delivery row sub-controls
 * (Pulled from v4_design.css L5680-L5830 — Section 12b's missing
 * companion. These rules govern the inner controls of the Phone/Email
 * "Voicemail Received By" select, Carbon Copy toggle column placement,
 * vm-conditional-input visible-but-disabled states, and the sub-row
 * "Email Address" pseudo-labels that appear when toggles are enabled.)
 * ------------------------------------------------------------ */

/* vm-setting-area: its padding is ONE rule, section 14.G below. */

/* Phone/Email "Voicemail Received By" select — custom SVG chevron,
   strips native chrome for cross-browser consistency */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_notify_email select[name="send_voice_message_notify_email_enabled"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234F5B6E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px 14px;
    cursor: pointer;
}

/* [REMOVED] CC toggle grid pin — moved to § 14.J */

/* Carbon Copy email sub-row — appears when toggle is ON */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_carbon_copy > div:nth-child(2):has(input[name="voice_message_carbon_copy_email_address"]:not(.hidden)) {
    align-items: center;
    display: grid;
    grid-column: 1 / 3;
    grid-row: 2;
    grid-template-columns: var(--aa-vm-label-width, 240px) minmax(260px, var(--aa-vm-control-width, 420px));
    margin-top: 6px;
    gap: 8px;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_carbon_copy > div:nth-child(2):has(input[name="voice_message_carbon_copy_email_address"]:not(.hidden))::before {
    color: #1B3557;
    content: "Email Address";
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_carbon_copy > div:nth-child(2):has(input[name="voice_message_carbon_copy_email_address"]:not(.hidden)) input[name="voice_message_carbon_copy_email_address"] {
    grid-column: 2 / 3;
}

/* Even spacing between vm-setting-rows so when one row expands to
   two grid rows, the next row doesn't sit tight against it */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-area > .row > div > .vm-setting-row + .vm-setting-row {
    margin-top: 14px;
}

/* [REMOVED] vm-conditional-input display/disabled/active states — moved to § 14.S */

/* Voicemail Received By "Email Address" sub-row — always visible,
   anchored to vm-conditional-input presence */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_notify_email > div:nth-child(2):has(input.vm-conditional-input) {
    align-items: center;
    display: grid;
    grid-column: 1 / 3;
    grid-row: 2;
    grid-template-columns: var(--aa-vm-label-width, 240px) minmax(260px, var(--aa-vm-control-width, 420px));
    margin-top: 6px;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_notify_email > div:nth-child(2):has(input.vm-conditional-input)::before {
    color: var(--v4-text);
    content: "Email Address";
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_notify_email > div:nth-child(2):has(input.vm-conditional-input) input.vm-conditional-input {
    grid-column: 2 / 3;
}


/* ============================================================
 * § 11 — ANNOUNCEMENT AREA
 * ------------------------------------------------------------
 * Announcement and quick-section recorder wrappers across
 * Auto-attendant, Call Center, Hunt Group, Submenu, and
 * Advanced/Pre-alert layers.
 *
 *   - .announcement-area              wrapper (AA #advanced)
 *   - .announcement_quick_section     AA business/after/holiday
 *                                     hours greeting wrapper
 *   - .announcement_quick_section     also seen on submenu
 *     .announcement_controls          card
 *   - CC / HG `#announcements` rules  (entrance message, comfort
 *     message, MOH for queued calls, estimated wait, mandatory
 *     entrance)
 *
 * The painters in extension_editable.js read the
 * .announcement_quick_section width / column-gap from these
 * rules; do not change without checking that JS too.
 * ============================================================ */

/* ------------------------------------------------------------
 * #advanced .announcement-area wrapper (AA Pre-alert / VM tabs)
 * ------------------------------------------------------------ */
body.v4-body .v4-content #advanced .announcement-area,
body.v4-body .v4-content #advanced .voicemail-greeting-area {
    margin: 0 !important;
}

body.v4-body .v4-content #advanced .announcement-area > .greeting_selector_fixer,
body.v4-body .v4-content #advanced .voicemail-greeting-area > .announcement_controls {
    width: 100%;
    margin: 0;
    padding: 0 0 14px;
    border-bottom: 1px solid rgba(231, 237, 244, 0.9);
    display: flex;
    align-items: center;
    gap: var(--greeting-grid-gap);
}

body.v4-body .v4-content #advanced .announcement-area .greeting,
body.v4-body .v4-content #advanced .voicemail_main_greeting {
    margin: 14px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
}

/* ------------------------------------------------------------
 * AA #auto_attendant_app .announcement_quick_section family
 *   Business / after-hours / holiday / submenu greeting wrappers.
 *   Compact 34px high quick-section row.
 *   Source: v4_2026.css L2570-L2581 + auto_attendant.css L484-L507.
 * ------------------------------------------------------------ */
body.v4-body .v4-content [id$="_app"] .business_hours_greeting_area .announcement_quick_section,
body.v4-body .v4-content [id$="_app"] .after_hours_greeting_area .announcement_quick_section,
body.v4-body .v4-content [id$="_app"] .holiday_hours_greeting_area .announcement_quick_section {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
    height: 34px;
    min-height: 34px;
    max-height: 34px;
    align-items: center;
}

/* AA-only outer wrapper (no bottom border on the quick-section). */
body.v4-body .v4-content #business .business_hours_greeting_area > .announcement_quick_section,
body.v4-body .v4-content #after-hours .after_hours_greeting_area > .announcement_quick_section,
body.v4-body .v4-content #holiday .holiday_hours_greeting_area > .announcement_quick_section {
    border-bottom: 0;
    padding-bottom: 0;
}

/* AA unified-shell quick-section flatten (no card-in-card). */
body.v4-body .v4-content #auto_attendant_app :is(.business_hours_greeting_area, .after_hours_greeting_area, .holiday_hours_greeting_area, .aa-submenu-greeting-card) .announcement_quick_section {
    align-items: stretch;
    display: block;
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0;
    width: 100%;
}

/* ------------------------------------------------------------
 * AA .announcement_quick_section internal controls
 *   The .right_content / .announcement_controls flex layout
 *   inside each quick section.
 *   Source: auto_attendant_inline.css L1054-L1080.
 * ------------------------------------------------------------ */
body.v4-body .v4-content #auto_attendant_app .announcement_quick_section .announcement_controls,
body.v4-body .v4-content #auto_attendant_app .announcement-area > .greeting_selector_fixer,
body.v4-body .v4-content #auto_attendant_app .voicemail-greeting-area > .announcement_controls,
body.v4-body .v4-content #auto_attendant_app .submenu_greeting .announcement_controls {
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: var(--greeting-grid-gap);
}

body.v4-body .v4-content #auto_attendant_app .submenu_greeting .greeting_selector_fixer {
    align-items: center;
    justify-content: flex-start;
    gap: var(--greeting-grid-gap);
}

/* ------------------------------------------------------------
 * AA .announcement-area / .voicemail-greeting-area hidden buttons
 *   Hide the Apply/Cancel/Edit affordances that aren't currently
 *   relevant (toggle-driven by JS).
 *   Source: auto_attendant_inline.css L1087-L1097.
 * ------------------------------------------------------------ */
body.v4-body .v4-content #auto_attendant_app .announcement-area .add_new_greeting.hidden,
body.v4-body .v4-content #auto_attendant_app .announcement-area .cancel_new_greeting.hidden,
body.v4-body .v4-content #auto_attendant_app .announcement-area .edit_greeting_name.hidden,
body.v4-body .v4-content #auto_attendant_app .voicemail-greeting-area .add_new_greeting.hidden,
body.v4-body .v4-content #auto_attendant_app .voicemail-greeting-area .cancel_new_greeting.hidden,
body.v4-body .v4-content #auto_attendant_app .voicemail-greeting-area .edit_greeting_name.hidden {
    display: none !important;
}

/* ------------------------------------------------------------
 * AA Pre-alert / Sub-menu announcement cards
 *   Embedded card wrappers (aa-prealert-announcement-card and
 *   aa-submenu-greeting-card).
 *   Source: auto_attendant_inline.css L1389-L1426.
 * ------------------------------------------------------------ */
body.v4-body .v4-content #submenu .aa-submenu-greeting-card > .announcement_controls,
body.v4-body .v4-content #advanced .aa-prealert-announcement-card > .announcement_controls {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--greeting-grid-gap);
}

body.v4-body .v4-content #submenu .aa-submenu-greeting-card .greeting_selector_fixer,
body.v4-body .v4-content #advanced .aa-prealert-announcement-card .greeting_selector_fixer {
    width: 100%;
}

body.v4-body .v4-content #submenu .aa-submenu-greeting-card .control_section.greeting,
body.v4-body .v4-content #advanced .aa-prealert-announcement-card .control_section.greeting {
    margin-top: 14px;
}

body.v4-body .v4-content #submenu .aa-submenu-greeting-card .add_new_greeting.hidden,
body.v4-body .v4-content #submenu .aa-submenu-greeting-card .cancel_new_greeting.hidden,
body.v4-body .v4-content #submenu .aa-submenu-greeting-card .edit_greeting_name.hidden,
body.v4-body .v4-content #advanced .aa-prealert-announcement-card .add_new_greeting.hidden,
body.v4-body .v4-content #advanced .aa-prealert-announcement-card .cancel_new_greeting.hidden,
body.v4-body .v4-content #advanced .aa-prealert-announcement-card .edit_greeting_name.hidden {
    display: none !important;
}

/* ------------------------------------------------------------
 * .announcement-area / .announcement_controls download link
 *   Used by greeting / voicemail / submenu recorder rows.
 *   Source: v4_2026.css L2906-L2922.
 * ------------------------------------------------------------ */
body.v4-body .v4-content [id$="_app"] .greeting .download_link,
body.v4-body .v4-content [id$="_app"] .announcement_controls .download_link,
body.v4-body .v4-content [id$="_app"] .announcement-area .download_link {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

body.v4-body .v4-content [id$="_app"] .greeting .download_link:hover,
body.v4-body .v4-content [id$="_app"] .announcement_controls .download_link:hover,
body.v4-body .v4-content [id$="_app"] .announcement-area .download_link:hover {
    background: transparent !important;
    text-decoration: none !important;
}

/* ------------------------------------------------------------
 * .announcement-area / .announcement_controls / .greeting select chrome
 *   Picks up the recorder dropdown styling.
 *   Source: v4_2026.css L2926-L2952.
 * ------------------------------------------------------------ */
body.v4-body .v4-content [id$="_app"] .announcement-area select,
body.v4-body .v4-content [id$="_app"] .announcement_controls select {
    height: var(--greeting-control-height) !important;
    min-height: var(--greeting-control-height) !important;
    line-height: var(--greeting-control-height) !important;
    padding: 0 30px 0 12px !important;
    border-radius: var(--greeting-button-radius) !important;
    border: 1px solid var(--greeting-border-color) !important;
    background-color: #FFFFFF !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7A90' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--v4-navy) !important;
    min-width: 220px !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    transition: border-color .15s ease, box-shadow .15s ease !important;
}

/* The call center Playback recorders (entrance message, comfort message,
   hold music) sit in a .voicemail-greeting-area inside a shared card since
   2026-09-19 and take the recorder's own layout; the bordered frames, the
   435px label column and the 40px fields that stood here are gone. */

@media (max-width: 576px) {
    .busy_greeting_announcement_inline {
        margin-left: 0;
    }
    [data-greeting="existing"] .announcement_controls button {
        padding-left: 0;
        margin-left: 0;
        display: block;
    }
    [data-greeting="existing"] .announcement_controls .play {
        margin-top: 5px;
    }
}

@media (max-width: 440px) {
    .busy_greeting_announcement_inline {
        margin-top: 4px;
    }
}


/* ============================================================
 * §§ SUPPLEMENT — v4_design.css recorder/voicemail/announcement rules
 * extracted in a second pass (the first manifest captured selector
 * ranges with empty bodies for many rules in lines 5876-6622).
 * Organized into sub-sections matching § 3 / § 4 / § 5 / § 10 / § 11.
 * ============================================================ */

/* ============================================================
 * v4_design.css — RECORDER / VOICEMAIL / ANNOUNCEMENT SUPPLEMENT
 * ============================================================
 * Second-pass extraction. The first pass (v4_recorder_module.css)
 * captured lines ~5680-5830 plus selector ranges with empty bodies
 * for everything else. This file captures every recorder-related
 * rule body in v4_design.css that was NOT already harvested.
 *
 * Source: v4_design.css lines ~4216-4730 (early aa-vm-section setup)
 *         + lines ~5876-6622 (the second voicemail polish wave).
 *
 * Specificity has been collapsed — the duplicated
 *   body.v4-body #v4-app .v4-content
 *   body.v4-body .v4-content
 * prefix pairs that the source uses to win specificity wars in PHP
 * are simplified to a single clean selector targeting the actual
 * DOM. !important is kept ONLY where it's beating a known
 * framework / cascade rule (.hidden, Bootstrap defaults, legacy
 * extension_editable.css / auto_attendant_inline.css rules).
 * ============================================================ */


/* ============================================================
 * === SUPPLEMENT for § 10 (Delivery) ===
 * ============================================================ */

/* --- 10.A  Section breathing room above first delivery row --- */

/* The area's padding is ONE rule, section 14.G below. Until 2026-09-20 seven
 * rules in two files said it (12, 20 / 12, 20, 12, 12, 20 / 12, 12 / 0) and the
 * one with three ids in v4_design.css won. */


/* --- 10.B  Phone / Email <select> in Voicemail Received By --- */

/* Render a visible SVG chevron and strip native chrome so the
 * picker reads consistently across browsers. */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_notify_email select[name="send_voice_message_notify_email_enabled"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding-right: 32px !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234F5B6E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 14px 14px !important;
    cursor: pointer !important;
}


/* --- 10.C  Email Carbon Copy toggle column placement --- */

/* [REMOVED] CC toggle grid pin — moved to § 14.J */


/* --- 10.D  Carbon Copy "Email Address" sub-row, original gating --- */

/* When the CC email input becomes visible (toggle ON), child 2
 * grows into a sub-row carrying the "Email Address" pseudo-label.
 * Match the VM-email sub-row layout exactly so both pseudos land
 * at the same offset. (Gated on the input being visible.) */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_carbon_copy > div:nth-child(2):has(input[name="voice_message_carbon_copy_email_address"]:not(.hidden)) {
    align-items: center !important;
    display: grid !important;
    grid-column: 1 / 3 !important;
    grid-row: 2 !important;
    grid-template-columns: var(--aa-vm-label-width, 240px) minmax(260px, var(--aa-vm-control-width, 420px)) !important;
    margin-top: 6px !important;
    gap: 8px !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_carbon_copy > div:nth-child(2):has(input[name="voice_message_carbon_copy_email_address"]:not(.hidden))::before {
    color: #1B3557 !important;
    content: "Email Address" !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 20px !important;
    white-space: nowrap !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_carbon_copy > div:nth-child(2):has(input[name="voice_message_carbon_copy_email_address"]:not(.hidden)) input[name="voice_message_carbon_copy_email_address"] {
    grid-column: 2 / 3 !important;
}


/* --- 10.E  Even vertical rhythm — original (12px-ish baseline) --- */

/* Each consecutive .vm-setting-row gets a consistent gap above so
 * the rhythm stays uniform when one row expands to two grid rows. */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-area > .row > div > .vm-setting-row + .vm-setting-row {
    margin-top: 14px !important;
}


/* [REMOVED] 10.F vm-conditional-input display/disabled/active — moved to § 14.S */


/* --- 10.G  VM Email "Email Address" sub-row anchored to conditional input --- */

/* The conditional input is now ALWAYS in the DOM (just dimmed when
 * off), so the original :has(:not(.hidden)) gate no longer fires.
 * Anchor the sub-row to the vm-conditional-input presence instead. */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_notify_email > div:nth-child(2):has(input.vm-conditional-input) {
    align-items: center !important;
    display: grid !important;
    grid-column: 1 / 3 !important;
    grid-row: 2 !important;
    grid-template-columns: var(--aa-vm-label-width, 240px) minmax(260px, var(--aa-vm-control-width, 420px)) !important;
    margin-top: 6px !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_notify_email > div:nth-child(2):has(input.vm-conditional-input)::before {
    color: var(--v4-text) !important;
    content: "Email Address" !important;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 20px !important;
    white-space: nowrap !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_notify_email > div:nth-child(2):has(input.vm-conditional-input) input.vm-conditional-input {
    grid-column: 2 / 3 !important;
}


/* --- 10.H  CC Email Address sub-row, anchored to conditional input --- */

body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_carbon_copy > div:nth-child(2):has(input.vm-conditional-input) {
    align-items: center !important;
    display: grid !important;
    grid-column: 1 / 3 !important;
    grid-row: 2 !important;
    grid-template-columns: var(--aa-vm-label-width, 240px) minmax(260px, var(--aa-vm-control-width, 420px)) !important;
    margin-top: 6px !important;
    gap: 8px !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_carbon_copy > div:nth-child(2):has(input.vm-conditional-input)::before {
    color: var(--v4-text) !important;
    content: "Email Address" !important;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 20px !important;
    white-space: nowrap !important;
}


/* --- 10.I  Consistent Delivery label typography --- */

/* All .vm-setting-row label.label render at a single weight/color
 * so the section reads as one consistent surface, not a "coloring
 * book" of mixed weights inherited from the legacy form-control
 * defaults. */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-row > div > label.label {
    font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--v4-text) !important;
    line-height: 20px !important;
    margin: 0 !important;
    white-space: nowrap !important;
}


/* --- 10.J  Delivery / Caller-Options form labels (final wave) --- */

/* Final-pass label rules: 13px / 600 / #1B3557. Beats 10.I above
 * (this sweep ran later in the file). */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .vm-setting-row label.label {
    font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1B3557 !important;
    line-height: 20px !important;
}


/* --- 10.L  Icon-only info chip on Busy Greeting heading --- */

/* Unconditional circled (i) beside the "Busy Greeting" label —
 * no background, no border, no text. Hover/focus reveals tooltip. */
body.v4-body .v4-content :is(#extension_app, #hunt_group_app, #call_center_app, #auto_attendant_app, #agent_app) .aa-vm-info-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    color: #8A9AAF;
    cursor: help;
    vertical-align: middle;
    flex: 0 0 16px;
    transition: color 120ms ease-out;
}
body.v4-body .v4-content :is(#extension_app, #hunt_group_app, #call_center_app, #auto_attendant_app, #agent_app) .aa-vm-info-chip:hover,
body.v4-body .v4-content :is(#extension_app, #hunt_group_app, #call_center_app, #auto_attendant_app, #agent_app) .aa-vm-info-chip:focus-visible {
    color: #4F5B6E;
    outline: none;
}
body.v4-body .v4-content :is(#extension_app, #hunt_group_app, #call_center_app, #auto_attendant_app, #agent_app) .aa-vm-info-chip .aa-vm-cw-chip__icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: currentColor;
}


/* --- 10.N  Final delivery alignment pass (Pass 6, May 17) --- */

/* Strip vertical padding from every row so spacing is controlled
 * exclusively by row-gap (intra-row) and margin-top (inter-row). */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .vm-setting-area .vm-setting-row {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Pin VM + CC delivery rows to row 1 = 34px, row 2 auto, with the
 * tightest possible row-gap so the math for 36px label-to-label
 * across the compound pair works out. */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .vm-setting-area .voice_message_notify_email.vm-setting-row,
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .vm-setting-area .voice_message_carbon_copy.vm-setting-row {
    grid-template-rows: 34px auto !important;
    row-gap: 2px !important;
    gap: 2px 16px !important;
}

/* Default cross-row margin: 12px for non-Delivery rows so Caller
 * Options gets row(24) + margin(12) = 36px label-to-label. */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .vm-setting-area .vm-setting-row + .vm-setting-row {
    margin-top: var(--vt-row-gap, 5px) !important;
}

/* Override for the Delivery compound pair (notify_email → carbon_copy):
 * row-gap 2 + margin 2 = 36px label-to-label. */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .vm-setting-area .voice_message_notify_email + .voice_message_carbon_copy {
    margin-top: var(--vt-row-gap, 5px) !important;
}


/* --- 10.O  Carbon Copy sub-row: display:contents so pseudo flows
 *          into the parent grid (matches VM email pattern). --- */

body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .voice_message_carbon_copy > div:nth-child(2):has(input.vm-conditional-input) {
    display: contents !important;
}

/* CC "Email Address" pseudo-label placed in parent grid col 1 row 2 —
 * IDENTICAL placement and offset to VM Email Address pseudo. */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .voice_message_carbon_copy > div:nth-child(2):has(input.vm-conditional-input)::before {
    grid-column: 1 / 2 !important;
    grid-row: 2 !important;
    color: #1B3557 !important;
    content: "Email Address" !important;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 20px !important;
    margin-top: 4px !important;
    padding: 0 !important;
    white-space: nowrap !important;
}

/* CC email input — parent grid col 2 row 2, width 280px, height 34px.
 * Matches Phone dropdown / VM Email exactly. */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .voice_message_carbon_copy input.vm-conditional-input {
    grid-column: 2 / 3 !important;
    grid-row: 2 !important;
    width: 280px !important;
    max-width: 280px !important;
    min-width: 0 !important;
    height: 34px !important;
    margin: 0 !important;
    justify-self: end !important;
}

/* Pull the validation-warning span out of the layout flow so it
 * can't push the CC input right. */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .voice_message_carbon_copy .email_carbon_copy_comment {
    display: none !important;
}

/* Zero out VM Notify Email parent padding so it doesn't compete
 * with the inter-row margin. */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .voice_message_notify_email {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}


/* --- 10.P  Email Address pseudo-labels: normalize typography
 *          (override the earlier 4px margin-top so all VM/CC
 *          pseudos sit on the same baseline). --- */

body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .voice_message_notify_email > div:nth-child(2):has(input.vm-conditional-input)::before,
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .voice_message_carbon_copy > div:nth-child(2):has(input.vm-conditional-input)::before {
    font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1B3557 !important;
    line-height: 20px !important;
    margin-top: 0 !important;
}


/* --- 10.Q  Caller-Options rows (single-row, not compound):
 *          force min-height 24 + single grid row so the toggle
 *          stays beside the label. Excludes the compound Delivery
 *          + Transfer-on-0 rows. --- */

body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .vm-setting-area .vm-setting-row:not(.voice_message_notify_email):not(.voice_message_carbon_copy):not(.voice_message_transfer) {
    min-height: 34px !important;
    grid-template-rows: 34px !important;
}


/* --- 10.R  Transfer-on-0 compound row (matches Delivery pattern) --- */

/* Row 1: toggle + label. Row 2: "Phone Number" pseudo + phone input.
 * The phone input carries .vm-conditional-input so the .hidden
 * greyout rule kicks in when the toggle is off. */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .vm-setting-area .voice_message_transfer.vm-setting-row {
    grid-template-rows: 34px auto !important;
    row-gap: 2px !important;
    gap: 2px 16px !important;
    min-height: 34px !important;
}

/* Phone input wrapper: display:contents so children + ::before flow
 * into the parent grid (mirrors VM Email Address pattern). */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .voice_message_transfer > div:nth-child(2):has(input.vm-conditional-input) {
    display: contents !important;
}

/* "Phone Number" pseudo-label in parent col 1 row 2 — identical
 * placement and typography to VM/CC Email Address pseudos. */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .voice_message_transfer > div:nth-child(2):has(input.vm-conditional-input)::before {
    grid-column: 1 / 2 !important;
    grid-row: 2 !important;
    color: #1B3557 !important;
    content: "Phone Number" !important;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    align-self: center !important;
}

/* Phone input itself: parent col 2 row 2, 280px right-aligned. */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .voice_message_transfer input.vm-conditional-input {
    grid-column: 2 / 3 !important;
    grid-row: 2 !important;
    width: 280px !important;
    max-width: 280px !important;
    min-width: 0 !important;
    height: 34px !important;
    margin: 0 !important;
    justify-self: end !important;
}

/* Hide the empty error_message sibling so it doesn't claim a grid cell. */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .voice_message_transfer .error_message {
    display: none !important;
}

/* Cross-row margin AFTER Transfer compound: 7px (empirically tuned). */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .vm-setting-area .voice_message_transfer + .vm-setting-row {
    margin-top: var(--vt-row-gap, 5px) !important;
}


/* ============================================================
 * === SUPPLEMENT for § 11 (Announcement) ===
 * ============================================================ */

/* --- 11.A  Busy Greeting heading-row layout (CW chip variant) --- */

/* When the Busy Greeting heading carries a CW chip,
 * .aa-inline-subsection-title gets the --with-chip modifier.
 * Force it to a flex row so the label + chip share one line.
 * extension_editable.css forces display:block here at 2 IDs;
 * match the 2-ID specificity by including #voicemail in the chain. */
body.v4-body .v4-content [id$="_app"] #voicemail .aa-vm-section .aa-inline-subsection-title.aa-inline-subsection-title--with-chip,
body.v4-body .v4-content [id$="_app"] #voicemail-tab .aa-vm-section .aa-inline-subsection-title.aa-inline-subsection-title--with-chip {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap;
}

/* The heading label inside the with-chip row needs to size to its
 * own content so the chip sits flush instead of being pushed to
 * the right edge of a stretched block. An inline flex row rather
 * than an inline block, so its section icon sits on the words'
 * centre line like every other heading (2026-09-11: the Busy
 * Greeting icon hung 2.4px low). */
body.v4-body .v4-content [id$="_app"] #voicemail .aa-vm-section .aa-inline-subsection-title.aa-inline-subsection-title--with-chip > label.label,
body.v4-body .v4-content [id$="_app"] #voicemail-tab .aa-vm-section .aa-inline-subsection-title.aa-inline-subsection-title--with-chip > label.label {
    width: auto !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
}


/* --- 11.B  Recorder rows above sub-section dividers --- */

/* The first three sections (Name Recording, Greeting, Busy
 * Greeting) use .aa-vm-recorder-area / .voicemail-greeting-area —
 * the section header's .v4-section-desc hairline is the single
 * divider, so no border-top is needed here (would produce a double
 * line). Just give the rows breathing room. */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .aa-vm-recorder-area,
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .voicemail-greeting-area {
    border-top: 0 !important;
    padding-top: 12px !important;
    margin-top: 0 !important;
}


/* --- 11.C  Recorder ROW labels (Recording / Listen / Create) --- */

/* Voicemail recorder row labels match the AA greeting exactly:
 * 13px / 750 / #536984, mixed-case, no letter-spacing. The
 * voicemail tab had drifted to UPPERCASE / 600 / #1B3557 /
 * 1.56px tracking. */
body.v4-body .v4-content :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab label.greeting_label {
    font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    color: #536984 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 34px !important;
}


/* ============================================================
 * === SUPPLEMENT for § 3 / § 4 (Selector / Recorder shell) ===
 * ============================================================ */

/* --- 3.A  new-recording text input — pill metrics on the row --- */

/* `add_new_greeting_input` is the "type a new recording name" input
 * that appears when the user clicks the + button next to the
 * shared-recording dropdown. Lock it to a 34px chip with consistent
 * border + radius so it tracks the dropdown / User select / Apply
 * / Cancel buttons. */
body.v4-body .v4-content [id$="_app"] .shared-recording-selector input[name="add_new_greeting_input"]:not(.hidden) {
    padding: 0 12px !important;
    font-size: 13px !important;
    vertical-align: middle !important;
    border: 1px solid var(--greeting-border-color) !important;
    border-radius: 8px !important;
    background-color: var(--v4-surface) !important;
}


/* --- 3.B  "User" scope select (add_new_greeting_select) --- */

/* The User scope select inherits font-weight:600 from a competing
 * rule in extension_editable.css line ~1046 with 2-ID specificity.
 * Apply / Cancel render at 700. To match them, this override needs
 * 2 IDs in the chain plus the modifier class to win source-order. */
body.v4-body .v4-content [id$="_app"] .shared-recording-selector select[name="add_new_greeting_select"]:not(.hidden),
body.v4-body .v4-content [id$="_app"] #voicemail .shared-recording-selector select[name="add_new_greeting_select"]:not(.hidden) {
    padding: 0 14px !important;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border: 1px solid var(--greeting-border-color) !important;
    border-radius: 8px !important;
    background-color: var(--v4-surface) !important;
    color: var(--v4-text-secondary) !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: none !important;
    text-align: center !important;
    text-align-last: center !important;
    box-shadow: none !important;
    vertical-align: middle !important;
}


/* --- 3.C  Apply / Cancel text buttons (.add_new_greeting / .cancel_new_greeting) --- */

/* Existing v4_design rule at ~line 1018 (32x32 icon squares with
 * no padding) reaches Apply / Cancel inside the recording selector
 * too, but Apply/Cancel carry text labels not icons, so the crush
 * was wrong here. Reclaim the row context with text-button sizing
 * while leaving the icon rule in place for table_button /
 * edit_submenu_name elsewhere. */
body.v4-body .v4-content [id$="_app"] .shared-recording-selector .add_new_greeting:not(.hidden),
body.v4-body .v4-content [id$="_app"] .shared-recording-selector .cancel_new_greeting:not(.hidden) {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 16px !important;
    margin: 0 !important;
    border: 1px solid var(--greeting-border-color) !important;
    border-radius: 8px !important;
    background: var(--v4-surface) !important;
    color: var(--v4-text-secondary) !important;
    font: 500 13px "Plus Jakarta Sans", system-ui, sans-serif !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}
/* When .hidden is present, respect it */
body.v4-body .v4-content [id$="_app"] .shared-recording-selector .add_new_greeting.hidden,
body.v4-body .v4-content [id$="_app"] .shared-recording-selector .cancel_new_greeting.hidden {
    display: none !important;
}
body.v4-body .v4-content [id$="_app"] .shared-recording-selector .add_new_greeting:hover,
body.v4-body .v4-content [id$="_app"] .shared-recording-selector .cancel_new_greeting:hover {
    background: var(--v4-surface-alt) !important;
    border-color: #CBD1DC !important;
    color: var(--v4-text) !important;
}


/* --- 3.D  Edit button in voicemail recorder rows --- */

/* REMOVED: 34px icon-only override.  The JS normalizer
 * (alignAudioButtonContent) adds "Edit" text + .aa-audio-button-aligned,
 * so the standard pill style at the .aa-audio-button-aligned rule handles
 * width (100% of the 74px grid cell), height, border, and hover. */


/* --- 3.E  Existing-recording dropdown — hard 376px width --- */

/* Don't override --shared-recorder-select-width here. The 376px
 * default from extension_editable.css gives Dropdown (376) + gap
 * (10) + Edit (76) = Edit's right edge at x=885, matching the
 * Listen row's "Speech to Text" and Create row's "Text to Speech"
 * right edges. Hard-pin all three width axes so neither the grid
 * template's minmax nor any other rule can stretch it. */
body.v4-body .v4-content [id$="_app"] .aa-vm-section .announcement-area .announcement_controls.shared-recording-selector > select#greeting_select_dropdown:not(.hidden) {
    width: 376px !important;
    min-width: 376px !important;
    max-width: 376px !important;
    vertical-align: middle !important;
}

/* Same width on the new-recording text input so the two states
 * share the dropdown column width and Edit lands at the same x. */
body.v4-body .v4-content [id$="_app"] .aa-vm-section .announcement-area .announcement_controls.shared-recording-selector > input[name="add_new_greeting_input"]:not(.hidden) {
    width: 376px !important;
    min-width: 376px !important;
    max-width: 376px !important;
}


/* --- 3.F  Voicemail recorder — New / Rename mode layout --------- */

/* The vm selector template ("Voicemail recorder variant", §4) is a
 * fixed 3-column grid (label | select | edit) with a hard 34px height
 * clamp. It cannot seat the controls that appear when the user picks
 * "New +" in the dropdown (name input + scope select + Apply +
 * Cancel) or renames via the edit pencil (input + Apply + Cancel):
 * the extra controls wrapped into implicit grid rows inside the
 * clamped box and painted on top of the Listen row below, and the
 * scope select (min-width 220px from the .announcement_controls
 * select rule) overflowed its 74px cell across Apply/Cancel.
 * Reported on Extension voicemail Name Recording; applies equally to
 * the AA/CC/HG/Ext voicemail Greeting and Ext Busy Greeting.
 *
 * Mode is keyed off the controls' actual visibility with :has()
 * because data-greeting-mode is NOT reliable inside #voicemail:
 * aa_tabs.js's normalizer doesn't re-observe these areas after the
 * dropdown changes, and #name-recording-content isn't in its area
 * list at all. */

/* New mode: label | name input | scope | Apply | Cancel */
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .aa-vm-recorder-selector:has(> select[name="add_new_greeting_select"]:not(.hidden)) {
    grid-template-columns:
        var(--greeting-label-width)
        minmax(180px, var(--greeting-select-width))
        auto auto auto;
    height: auto;
    max-height: none;
}

/* Rename mode: label | name input | Apply | Cancel */
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .aa-vm-recorder-selector:has(> input[name="add_new_greeting_input"]:not(.hidden)):has(> select[name="add_new_greeting_select"].hidden) {
    grid-template-columns:
        var(--greeting-label-width)
        minmax(180px, var(--greeting-select-width))
        auto auto;
    height: auto;
    max-height: none;
}

/* Let DOM order place the controls in both modes. The
 * .aa-selector-normalized rules pin grid-column per
 * data-greeting-mode, and with the attribute stale inside
 * #voicemail those pins seat controls in the wrong cells. */
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .aa-vm-recorder-selector:has(> input[name="add_new_greeting_input"]:not(.hidden)) > :is(input[name="add_new_greeting_input"], select[name="add_new_greeting_select"], .add_new_greeting, .cancel_new_greeting, .edit_greeting_name) {
    grid-column: auto;
}

/* Name input fills its grid cell (beats the 376px pin in §3.E,
 * which overflowed the 304px column) and rides the 34px row
 * (beats the 40px form-control height). */
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .aa-vm-recorder-selector > input[name="add_new_greeting_input"]:not(.hidden) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: var(--greeting-control-height) !important;
    min-height: var(--greeting-control-height) !important;
    max-height: var(--greeting-control-height) !important;
}

/* Scope select sizes to its content ("User" / "Group") and rides
 * the 34px row (beats min-width 220px + 40px height). */
body.v4-body .v4-content :is(#auto_attendant_app, #call_center_app, #hunt_group_app, #extension_app, #greetings_app, #agent_app) .aa-vm-recorder-selector > select[name="add_new_greeting_select"]:not(.hidden) {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: var(--greeting-control-height) !important;
    min-height: var(--greeting-control-height) !important;
    max-height: var(--greeting-control-height) !important;
}


/* ============================================================
 * === SUPPLEMENT for § 5 (TTS) ===
 * ============================================================ */

/* --- 5.A  TTS panel indent + zero ambient gap --- */

/* TTS panel reset — keep side/bottom margins at zero for alignment
 * but allow a top gap so the panel doesn't touch the Create row. */
body.v4-body .v4-content [id$="_app"] .greeting_container[data-container_name="text-to-speech"]:not(.hidden) {
    margin-top: var(--greeting-row-gap) !important;
    margin-left: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}


/* --- 5.B  Collapse Upload + Record placeholder wrappers --- */

/* The Upload and Record templates leave a 10px-tall .greeting_content
 * placeholder behind when their children are zero-height, leaking
 * ~22px of dead space below the "Recording Uploaded Successfully"
 * line before the TTS picker shows. Zero both the wrapper AND its
 * children when they're NOT the active panel (active gets the
 * .greeting_parent class from JS). margin/padding/min-height
 * weren't enough — force height:0 + overflow:hidden. */
body.v4-body .v4-content [id$="_app"] div[data-container_name="upload"]:not(.greeting_parent),
body.v4-body .v4-content [id$="_app"] div[data-container_name="record"]:not(.greeting_parent) {
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}
body.v4-body .v4-content [id$="_app"] div[data-container_name="upload"] > .greeting_content,
body.v4-body .v4-content [id$="_app"] div[data-container_name="record"] > .greeting_content,
body.v4-body .v4-content [id$="_app"] div[data-container_name="upload"] > .greeting_content.pt-0,
body.v4-body .v4-content [id$="_app"] div[data-container_name="record"] > .greeting_content.pt-0 {
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Defensive — also catch any sibling .greeting_container without
 * .greeting_parent (covers container_names we haven't enumerated). */
body.v4-body .v4-content [id$="_app"] .greeting_container:not(.greeting_parent) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
}
body.v4-body .v4-content [id$="_app"] .greeting_container:not(.greeting_parent) > .greeting_content {
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}


/* --- 5.C  Voice picker (voice_select) — cursor only here.
 *          Sizing is centralized in v4_2026.css. --- */

body.v4-body .v4-content [id$="_app"] .greeting_container[data-container_name="text-to-speech"] select.voice_select,
body.v4-body .v4-content [id$="_app"] .greeting_container[data-container_name="text-to-speech"] select.tts_language_select,
body.v4-body .v4-content [id$="_app"] .voice-row select.voice_select,
body.v4-body .v4-content [id$="_app"] .voice-row select.tts_language_select {
    cursor: pointer !important;
    height: var(--greeting-control-height) !important;
    min-height: var(--greeting-control-height) !important;
    margin-right: 0 !important;
    padding: 0 30px 0 12px !important;
    border: 1px solid var(--greeting-border-color) !important;
    border-radius: var(--greeting-button-radius) !important;
    background-color: #FFFFFF !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7A90' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--v4-navy) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

body.v4-body .v4-content [id$="_app"] .greeting_container[data-container_name="text-to-speech"] select.voice_select:focus,
body.v4-body .v4-content [id$="_app"] .greeting_container[data-container_name="text-to-speech"] select.tts_language_select:focus,
body.v4-body .v4-content [id$="_app"] .voice-row select.voice_select:focus,
body.v4-body .v4-content [id$="_app"] .voice-row select.tts_language_select:focus {
    outline: none;
    border-color: var(--greeting-border-color);
    box-shadow: none;
}

/* --- 5.D  Voice-preview Play / Pause buttons (.tts-btn-sm) --- */

/* 34px rounded-square chip to track the voice_select height. Round
 * square (8px) not full circle (999) so it reads as part of the
 * same family as Upload / Record / Text-to-Speech buttons above.
 *
 * CRITICAL: `:not(.hidden)` on the selector. Without it, the
 * display:inline-flex would override the Bootstrap .hidden utility
 * (display:none !important) at equal !important + higher specificity,
 * so the Pause button (toggled via .hidden by JS) would always
 * show alongside Play. */
body.v4-body .v4-content :is(#extension_app, #hunt_group_app, #call_center_app, #auto_attendant_app, #greetings_app, #agent_app) .greeting_container[data-container_name="text-to-speech"] .btn.tts-btn-sm:not(.hidden),
body.v4-body .v4-content :is(#extension_app, #hunt_group_app, #call_center_app, #auto_attendant_app, #greetings_app, #agent_app) .greeting_container[data-container_name="text-to-speech"] .voice_preview_play:not(.hidden),
body.v4-body .v4-content :is(#extension_app, #hunt_group_app, #call_center_app, #auto_attendant_app, #greetings_app, #agent_app) .greeting_container[data-container_name="text-to-speech"] .voice_preview_pause:not(.hidden) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* A fixed chip in a flex row: flex-basis and min-width pin it at 34px
     * so a stretched voice_select (the pre-alert card grows it to fill the
     * row) shrinks instead of the chips. Measured 2026-09-06: with the gear
     * added, both chips on the AA pre-alert card had shrunk to 22.5px. */
    flex: 0 0 var(--greeting-control-height) !important;
    width: var(--greeting-control-height) !important;
    min-width: var(--greeting-control-height) !important;
    height: var(--greeting-control-height) !important;
    min-height: var(--greeting-control-height) !important;
    border: 1px solid var(--greeting-border-color) !important;
    border-radius: var(--greeting-button-radius) !important;
    background: #FFFFFF !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Belt-and-suspenders — explicit display:none on the .hidden state
 * so a competing higher-specificity rule can't unhide them. */
body.v4-body .v4-content :is(#extension_app, #hunt_group_app, #call_center_app, #auto_attendant_app, #agent_app) .greeting_container[data-container_name="text-to-speech"] .voice_preview_play.hidden,
body.v4-body .v4-content :is(#extension_app, #hunt_group_app, #call_center_app, #auto_attendant_app, #agent_app) .greeting_container[data-container_name="text-to-speech"] .voice_preview_pause.hidden,
body.v4-body .v4-content :is(#extension_app, #hunt_group_app, #call_center_app, #auto_attendant_app, #agent_app) .greeting_container[data-container_name="text-to-speech"] .btn.tts-btn-sm.hidden {
    display: none !important;
}


/* --- 5.D2  Voice settings: the gear and the Speed panel (2026-09-06) --- */

/* The gear carries .tts-btn-sm, so the chip rule above already gives it
 * the voice Play button's exact 34px shape. Added here: a centred icon,
 * the open state, and the dot that says a setting is not at its default
 * while the panel is closed. */
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .btn.tts_settings_toggle {
    position: relative;
    color: var(--v4-text-secondary);
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .btn.tts_settings_toggle i {
    margin: 0;
    font-size: 13px;
    line-height: 1;
    opacity: 0.8;
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .btn.tts_settings_toggle:hover i,
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .btn.tts_settings_toggle.is-open i {
    opacity: 1;
}

body.v4-body .v4-content :is(#extension_app, #hunt_group_app, #call_center_app, #auto_attendant_app, #greetings_app, #agent_app) .greeting_container[data-container_name="text-to-speech"] .btn.tts_settings_toggle.is-open:not(.hidden) {
    border-color: var(--v4-brand) !important;
    background: #FEF9F1 !important;
    color: var(--v4-brand-dark);
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .btn.tts_settings_toggle.has-custom::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--v4-brand);
    box-shadow: 0 0 0 2px #FFFFFF;
}

/* The panel is one more row of the same two-column grid as Voice and
 * Message: the label column, then one bordered control the height of the
 * selects beside it, holding the slider, the readout and Reset. */
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .tts-settings-panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--greeting-grid-gap);
    width: 100%;
    max-width: 100%;
    margin: var(--greeting-row-gap) 0 0;
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .tts-settings-panel.hidden {
    display: none !important;
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .tts-settings-body {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: var(--greeting-control-height);
    min-height: var(--greeting-control-height);
    padding: 0 12px;
    border: 1px solid var(--greeting-border-color);
    border-radius: var(--greeting-button-radius);
    background: #FFFFFF;
    box-sizing: border-box;
}

/* The slider: a 4px track filled in brand orange up to the thumb (the
 * fill is --tts-speed-pct, kept current by greeting.js), a white thumb
 * with an orange ring. The range is excluded from the generic input
 * focus rule in v4_forms.css, so nothing else shapes it. */
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] input[type="range"].tts_speed_range {
    -webkit-appearance: none;
    appearance: none;
    width: 160px;
    height: 4px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 2px;
    background: linear-gradient(to right, var(--v4-brand) 0%, var(--v4-brand) var(--tts-speed-pct, 50%), #E9ECEF var(--tts-speed-pct, 50%), #E9ECEF 100%);
    outline: none;
    box-shadow: none;
    cursor: pointer;
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] input[type="range"].tts_speed_range::-webkit-slider-runnable-track {
    height: 4px;
    background: transparent;
    border: none;
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] input[type="range"].tts_speed_range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    margin-top: -6px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid var(--v4-brand);
    box-shadow: 0 1px 2px rgba(14, 39, 73, 0.18);
    cursor: pointer;
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] input[type="range"].tts_speed_range::-moz-range-track {
    height: 4px;
    background: transparent;
    border: none;
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] input[type="range"].tts_speed_range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid var(--v4-brand);
    box-shadow: 0 1px 2px rgba(14, 39, 73, 0.18);
    cursor: pointer;
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .tts_speed_value {
    min-width: 44px;
    text-align: right;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: var(--v4-navy);
}

/* Reset is a word, not a box (his call, 2026-09-06): a boxed button
 * inside the 34px control fought its height. Plain text, no border, no
 * background, no height of its own; only the colour says it is pressable. */
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .btn.tts_speed_reset {
    display: inline-flex;
    align-items: center;
    height: auto;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: var(--v4-text-secondary);
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .btn.tts_speed_reset:hover,
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .btn.tts_speed_reset:focus {
    color: var(--v4-brand-dark);
    background: transparent;
    border: none;
    box-shadow: none;
    outline: none;
}

body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .btn.tts_speed_reset.hidden {
    display: none !important;
}


/* --- 5.E  TTS action row (AI / Play / Apply / Cancel) --- */

/* Rounded-square buttons (8px radius, not full pill) matching the
 * Upload / Record / Text-to-Speech row visually. Same height, same
 * border, same font so the whole flow reads as one consistent
 * control surface.
 *
 * The earlier extension_editable.css rules use #v4-app + #extension_app
 * (2 IDs) to set border-radius:999px — match their ID count plus
 * the data-container_name attribute selector to outrank them. */
body.v4-body .v4-content :is(#extension_app, #hunt_group_app, #call_center_app, #auto_attendant_app, #agent_app) .greeting_container[data-container_name="text-to-speech"] .tts-action-row .btn.tts-btn:not(.hidden) {
    width: var(--greeting-tts-button-width) !important;
    min-width: var(--greeting-tts-button-width) !important;
    max-width: var(--greeting-tts-button-width) !important;
    height: var(--greeting-control-height) !important;
    min-height: var(--greeting-control-height) !important;
    padding: 0 12px !important;
    margin: 0 !important;
    border: 1px solid var(--greeting-border-color) !important;
    border-radius: var(--greeting-button-radius) !important;
    background: #FFFFFF !important;
    color: var(--v4-text-secondary) !important;
    font: 600 13px "Plus Jakarta Sans", system-ui, sans-serif !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-shadow: none !important;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease !important;
}

/* Belt-and-suspenders for .hidden in the TTS action row. JS toggles
 * tts_preview_play/pause and uploading spinner via .hidden. */
body.v4-body .v4-content :is(#extension_app, #hunt_group_app, #call_center_app, #auto_attendant_app, #agent_app) .greeting_container[data-container_name="text-to-speech"] .tts-action-row .btn.tts-btn.hidden {
    display: none !important;
}

body.v4-body .v4-content [id$="_app"] .greeting_container[data-container_name="text-to-speech"] .tts-action-row .btn.tts-btn:hover {
    background: var(--v4-surface-alt) !important;
    border-color: #CBD1DC !important;
    color: var(--v4-text) !important;
}

body.v4-body .v4-content [id$="_app"] .greeting_container[data-container_name="text-to-speech"] .tts-action-row .btn.tts-btn .fa {
    font-size: 11px !important;
    line-height: 1 !important;
}

body.v4-body .v4-content [id$="_app"] .greeting_container[data-container_name="text-to-speech"] .tts-action-row {
    gap: var(--greeting-grid-gap) !important;
    margin-top: var(--greeting-row-gap) !important;
    padding-top: 0 !important;
}

/* ============================================================
 * § 12 — PHASE 1.5 PAINTER-REPLACEMENT RULES
 * ------------------------------------------------------------
 * These rules pair with class toggles that REPLACED inline-style
 * painters in v4_design.js, aa_tabs.js, call_center.js,
 * hunt_group.js, and extension_editable.js.
 *
 * Naming convention: each class is what the JS now ADDS instead of
 * painting inline styles. The CSS rule here is the canonical form.
 * ============================================================ */

/* --- aa-vm-static-name-recording (v4_design.js normalizeVoicemailRecorders) --- */
body.v4-body .v4-content .aa-vm-static-name-recording .aa-section-toggle {
    display: none;
}
body.v4-body .v4-content .aa-vm-static-name-recording [data-arrow-toggle-static] {
    cursor: default;
}
body.v4-body .v4-content .aa-vm-static-name-recording input[name="name_recording_enabled"],
body.v4-body .v4-content .aa-vm-static-name-recording .aa-subsection-header img {
    display: none;
}
body.v4-body .v4-content .aa-vm-static-name-recording #name-recording-content {
    display: block;
}

/* --- aa-vm-delivery-row (replaces v4_design.js voice_message_notify_email painter) --- */
body.v4-body .v4-content .aa-vm-delivery-row {
    align-items: center;
    column-gap: 16px;
    display: grid;
    grid-template-columns: 260px 280px minmax(0, 1fr);
    row-gap: 2px;
}
body.v4-body .v4-content .aa-vm-delivery-row .aa-vm-delivery-select-cell {
    grid-column: 2 / 3;
    grid-row: 1;
    justify-self: stretch;
    width: 100%;
}
body.v4-body .v4-content .aa-vm-delivery-row .aa-vm-delivery-select-wrap,
body.v4-body .v4-content .aa-vm-delivery-row select[name="send_voice_message_notify_email_enabled"] {
    max-width: 280px;
    width: 280px;
}
body.v4-body .v4-content .aa-vm-delivery-row .aa-vm-delivery-email-row {
    display: contents;
}
body.v4-body .v4-content .aa-vm-delivery-row input[name="voice_message_delivery_email_address"],
body.v4-body .v4-content .aa-vm-delivery-email-input {
    grid-column: 2 / 3;
    grid-row: 2;
    margin-top: 0;
    max-width: 280px;
    width: 280px;
}

/* --- aa-vm-setting-row-grid (replaces v4_design.js vm-setting-row painter) --- */
body.v4-body .v4-content .aa-vm-setting-row-grid {
    align-items: center;
    column-gap: 16px;
    display: grid;
    grid-template-columns: 260px 280px minmax(0, 1fr);
    row-gap: 0;
}
body.v4-body .v4-content .aa-vm-setting-row-grid.voice_message_carbon_copy,
body.v4-body .v4-content .aa-vm-setting-row-grid.voice_message_transfer {
    row-gap: 2px;
}
body.v4-body .v4-content .aa-vm-setting-row-grid .aa-vm-setting-aligned-cell {
    grid-column: 2 / 3;
    grid-row: 1;
    justify-content: flex-end;
    justify-self: stretch;
    width: 100%;
}
body.v4-body .v4-content .aa-vm-setting-row-grid select[name="no_answer_number_of_rings"] {
    max-width: 74px;
    min-width: 74px;
    width: 74px;
}

/* --- aa-vm-password-section (replaces v4_design.js password section painters) --- */
body.v4-body .v4-content .aa-vm-password-section .vm-setting-area .comment {
    display: none;
}
body.v4-body .v4-content .aa-vm-password-section .aa-vm-reset-button-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
body.v4-body .v4-content .aa-vm-password-preview {
    display: none;
    margin-right: auto;
    padding-right: 12px;
    color: #C8651A;
    font-style: italic;
    font-size: 13px;
    line-height: 20px;
    user-select: text;
    white-space: nowrap;
}
body.v4-body .v4-content .aa-vm-password-preview.aa-vm-password-preview-shown {
    display: inline-block;
}

/* --- aa-vm-recorder-row button (replaces v4_design.js button.btn.tts-btn width painter) --- */
body.v4-body .v4-content .aa-vm-recorder-row button.btn.tts-btn {
    width: 100%;
}

/* --- aa-quick-section-invisible (replaces extension_editable.js .css() visibility toggle) --- */
body.v4-body .v4-content .aa-quick-section-invisible {
    visibility: hidden;
}

/* --- aa-menu-greeting-* (replaces aa_tabs.js normalizeAAMenuGreetingControls painters) --- */
body.v4-body .v4-content .aa-menu-announcement-wrap {
    align-items: center;
    display: flex;
    margin: 0;
    max-width: 100%;
    padding: 0;
    width: 100%;
}
body.v4-body .v4-content .aa-menu-announcement-wrap.hidden {
    display: none;
}
body.v4-body .v4-content .aa-menu-greeting-controls-normalized {
    align-items: center;
    display: grid;
    flex: 1 1 0;
    gap: 6px;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    grid-template-columns: 1fr;
    margin: 0;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    width: 100%;
}
body.v4-body .v4-content .aa-menu-greeting-controls-normalized.hidden {
    display: none;
}
body.v4-body .v4-content .aa-menu-greeting-controls-normalized .secondary-play,
body.v4-body .v4-content .aa-menu-greeting-controls-normalized .secondary-play > .btn,
body.v4-body .v4-content .aa-menu-greeting-controls-normalized .edit_greeting,
body.v4-body .v4-content .aa-menu-greeting-controls-normalized .secondary-stop,
body.v4-body .v4-content .aa-menu-greeting-controls-normalized .secondary-pause,
body.v4-body .v4-content .aa-menu-button {
    align-items: center;
    background: #FFFFFF;
    border-color: var(--greeting-border-color);
    border-radius: 7px;
    box-shadow: none;
    color: var(--aa-control-text, #153354);
    display: inline-flex;
    flex: 1 1 0;
    font-size: 12px;
    font-weight: 700;
    justify-content: center;
    margin: 0;
    min-width: 0;
    padding: 0 8px;
    width: 100%;
}
/* The play wrap is a container, not a control — strip its border/padding
   so its inner .btn child renders the chrome cleanly. */
body.v4-body .v4-content .aa-menu-greeting-controls-normalized .secondary-play,
body.v4-body .v4-content .aa-menu-button.secondary-play {
    border: 0;
    padding: 0;
}
/* When a button carries .hidden it must collapse — JS used to paint
   display:none here. */
body.v4-body .v4-content .aa-menu-button.hidden {
    display: none;
}


/* ============================================================
 * § 12B — SECTION ICON (injected by v4_design.js)
 * ============================================================ */
body.v4-body .v4-content [id$="_app"] .v4-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #FEF9F1;
    color: #F89939;
    margin-right: 8px;
    vertical-align: middle;
    flex-shrink: 0;
}
body.v4-body .v4-content [id$="_app"] .v4-section-icon svg {
    width: 13px;
    height: 13px;
}
body.v4-body .v4-content [id$="_app"] .aa-inline-subsection-title.v4-section-titled {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
}


/* ----------------------------------------------------------
 * § 12.B — SECTION DIVIDER
 * Subsection description text and shortened divider line that
 * aligns with content start/end (not full-width).
 * ---------------------------------------------------------- */
/* The heading is its natural height (the 24px icon line) and the description
   sits 4px under it, the same distance as under a FEATURE CARD HEADER title.
   Until 2026-09-20 the heading was forced to 38px and the description pulled
   8px up into it; on the auto attendant menus, where a legacy rule zeroes the
   label's min-height, the description printed over the word "Greeting". */
body.v4-body .v4-content [id$="_app"] .aa-subsection-header .v4-section-desc {
    color: var(--v4-text-secondary, #4F5B6E);
    font: 500 13px/1.45 "Plus Jakarta Sans", system-ui, sans-serif;
    margin: 4px 0 0;
    padding-bottom: 10px;
}
body.v4-body .v4-content [id$="_app"] .aa-subsection-header .v4-section-desc::after {
    content: "";
    display: block;
    height: 1px;
    background: #E4EBF3;
    margin-top: 10px;
    /* Align with content rails: label (116) + 3 buttons (148×3) + 3 gaps (8×3) */
    left: 0;
    width: 584px;
    max-width: 100%;
}

/* ----------------------------------------------------------
 * § 12.C — LABEL VERTICAL CENTERING
 * Ensures row labels sit vertically centered relative to their
 * adjacent controls, not top-aligned.
 * ---------------------------------------------------------- */
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .has-row-label {
    align-items: center;
}

/* ----------------------------------------------------------
 * § 12.D — VOICE ROW GAP FIX
 * Forces the voice-row inside TTS to use the canonical grid gap
 * instead of its default (which was 12px).
 * ---------------------------------------------------------- */
body.v4-body .v4-content .greeting_container[data-container_name="text-to-speech"] .voice-row {
    gap: var(--greeting-grid-gap);
}

/* ----------------------------------------------------------
 * § 12.E — GREETING SELECT BORDER-RADIUS OVERRIDE
 * v4_2026.css L1379 applies border-radius: 12px !important to
 * all selects globally. This rule wins by matching specificity
 * and loading later in the cascade.
 * ---------------------------------------------------------- */
body.v4-body .v4-content [id$="_app"] .aa-selector-normalized select,
body.v4-body .v4-content [id$="_app"] .aa-selector-normalized .greeting-select-dropdown,
body.v4-body .v4-content [id$="_app"] .greeting_container select,
body.v4-body .v4-content [id$="_app"] .voice-row select {
    border-radius: var(--greeting-button-radius) !important;
}

/* Per-key greeting card (menu keys only).
 * Scoped to td > .greeting so it never hits the main page-level
 * Greeting sections which are NOT inside table cells. */
body.v4-body .v4-content #auto_attendant_app td > .greeting.section_item {
    background: #F6F8FA;
    border: 1px solid #E9ECEF;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 8px 0;
}

/* ============================================================
 * § 13 — PAGE-SPECIFIC ESCAPE HATCHES
 * ONLY put a rule here if you can justify in a comment why it cannot live
 * in one of the cross-page sections above. Default: empty. If this section
 * grows, that is a code smell — refactor toward unification.
 * ============================================================ */

/* (intentionally empty) */


/* ============================================================
 * § 14 — VOICEMAIL TAB MASTER FRAMING
 *
 * Canonical layout for #voicemail-tab across all entity types.
 * The voicemail.php template uses .aa-unified-shell--voicemail
 * as a clean shell that delegates the card border to the parent
 * .setting_section. This section kills the double-border,
 * makes the content full-width, and enforces consistent grid
 * layout for every vm-setting-row.
 * ============================================================ */

/* --- 14.A  Shell border (matches aa-unified-shell--business etc.) --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .aa-unified-shell--voicemail {
    /* The same frame as every settings card (.aa-call-feature,
       entity_shared.css): #DDE7F1, 8px, 20px 24px inside. */
    border: 1px solid var(--aa-flat-section-border, #DDE7F1) !important;
    border-radius: 8px !important;
    padding: 20px 24px !important;
    margin: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab#voicemail-tab {
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

/* --- 14.B  Full-width voice_mail_container --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_mail_container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin-top: 0 !important;
}


/* --- 14.D  Section card rhythm (.aa-vm-section) --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .aa-vm-section {
    padding: 20px 0 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
/* THE CARD'S AIR (FEATURE CARD HEADER, entity_shared.css): the first box of
   every card body starts 30px under the header's hairline and the last line
   ends 29px above the frame. The 30 is the header's own margin, so the FIRST
   section carries no top padding of its own (with it the first heading sat
   50px down); the LAST section's rows end with the body-end 8px instead of
   the 12 the older passes gave every area (33px to the frame). The html and
   the three ids are what it takes to outrank those passes' !important
   (v4_design.css "A.", 10.A above). */
html body.v4-body #v4-app .v4-content .v4-tabbed-detail :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .voice_mail_container > .aa-vm-section:first-child {
    padding-top: 0 !important;
}
html body.v4-body #v4-app .v4-content .v4-tabbed-detail :is(#auto_attendant_app, #extension_app, #hunt_group_app, #call_center_app, #agent_app) #voicemail-tab .voice_mail_container > .aa-vm-section:last-child > .vm-setting-area {
    padding-bottom: var(--vt-card-body-end, 8px) !important;
}

/* --- 14.E  Section heading alignment --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .aa-vm-section > .aa-subsection-header {
    padding: 0 !important;
    margin: 0 !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .aa-vm-section .aa-inline-subsection-title > label.label {
    font: 700 17px/1.3 "Plus Jakarta Sans", system-ui, sans-serif !important;
    color: var(--v4-navy, #0E2749) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* --- 14.F  Greeting area (Recording/Listen/Create rows) --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voicemail-greeting-area {
    padding: 12px 0 0 !important;
    margin: 0 !important;
    border: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* --- 14.G  vm-setting-area + vm-setting-row grid ---
 * THE voicemail area's padding, the only place it is said: 20px over the
 * first row of a section, 12px under its last (what rendered all along; the
 * last section's area ends with the body-end 8px, 14.D above). */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .aa-vm-section > .vm-setting-area {
    padding: 20px 0 12px !important;
    margin: 0 !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-area > .vm-setting-row {
    display: grid !important;
    grid-template-columns: minmax(180px, 240px) minmax(200px, 328px) auto !important;
    grid-template-rows: 34px auto !important;
    column-gap: 16px !important;
    align-items: center !important;
    min-height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-area > .vm-setting-row + .vm-setting-row {
    margin-top: var(--vt-row-gap, 5px) !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-area > .vm-setting-row > div {
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-area > .vm-setting-row > div:empty {
    display: none !important;
}

/* --- 14.H  Row labels --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-area > .vm-setting-row > div:first-child > label.label {
    font: 600 13px/34px "Plus Jakarta Sans", system-ui, sans-serif !important;
    color: #314860 !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

/* --- 14.I  Form controls height + width cap (doubled ID beats v4_forms global 40px) --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab#voicemail-tab .vm-setting-row input.form-control,
body.v4-body .v4-content [id$="_app"] #voicemail-tab#voicemail-tab .vm-setting-row select.form-control,
body.v4-body .v4-content [id$="_app"] #voicemail-tab#voicemail-tab .vm-setting-row input.vm-conditional-input {
    height: 34px !important;
    min-height: 34px !important;
    max-width: 280px !important;
    justify-self: end !important;
    margin: 0 !important;
    border: 1px solid #C6D3E1 !important;
    border-radius: 7px !important;
    font-size: 13px !important;
    padding: 0 10px !important;
}

/* --- 14.J  Toggle / control cell alignment (right-aligned with input fields) --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-area > .vm-setting-row:not(.voice_message_notify_email) > div:last-child {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
}
/* --- 14.J2  Vertically center toggles within their grid cell --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-row > div:has(> .switch) {
    display: flex !important;
    align-items: center !important;
    height: auto !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-row > div:last-child .switch {
    margin: 0 !important;
}

/* --- 14.K  Delivery compound rows (Email Address sub-row) --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_notify_email,
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_carbon_copy {
    row-gap: 4px !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_notify_email > div:nth-child(2):has(input.vm-conditional-input),
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_carbon_copy > div:nth-child(2):has(input.vm-conditional-input) {
    display: contents !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_notify_email > div:nth-child(2)::before,
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_carbon_copy > div:nth-child(2):has(input.vm-conditional-input)::before {
    grid-column: 1 / 2 !important;
    grid-row: 2 !important;
    content: "Email Address" !important;
    font: 600 13px/34px "Plus Jakarta Sans", system-ui, sans-serif !important;
    color: #314860 !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_notify_email input.vm-conditional-input,
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_carbon_copy input.vm-conditional-input {
    grid-column: 2 / 3 !important;
    grid-row: 2 !important;
    width: 280px !important;
    max-width: 280px !important;
    justify-self: end !important;
}

/* --- 14.L  Delivery select (Phone/Email) --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_autoconfig {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_received_by_select {
    width: 100% !important;
    max-width: 100% !important;
}

/* --- 14.M  Transfer-on-0 compound row (Phone Number sub-row) --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_transfer {
    row-gap: 4px !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_transfer > div:nth-child(2):has(input.vm-conditional-input) {
    display: contents !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_transfer > div:nth-child(2):has(input.vm-conditional-input)::before {
    grid-column: 1 / 2 !important;
    grid-row: 2 !important;
    content: "Phone Number" !important;
    font: 600 13px/34px "Plus Jakarta Sans", system-ui, sans-serif !important;
    color: #314860 !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .voice_message_transfer input.vm-conditional-input {
    grid-column: 2 / 3 !important;
    grid-row: 2 !important;
    width: 280px !important;
    max-width: 280px !important;
    justify-self: end !important;
}

/* --- 14.N  Simple rows (no compound sub-row) --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-row--simple {
    grid-template-rows: 34px !important;
}

/* --- 14.O  Number-of-rings select --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-row--rings select.form-control {
    width: 280px !important;
    max-width: 280px !important;
    justify-self: end !important;
}


/* --- 14.Q  Carbon copy warning icon --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .email_carbon_copy_comment {
    display: none !important;
}

/* --- 14.R  Error message cleanup --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-row .error_message:empty {
    display: none !important;
}

/* --- 14.S  Conditional inputs always visible (override Bootstrap .hidden) --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab input.vm-conditional-input {
    display: block !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-row input.vm-conditional-input.hidden {
    display: block !important;
    visibility: visible !important;
    background-color: #F4F6FA !important;
    color: #9CA8B8 !important;
    border-color: #DBE3EC !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    user-select: none !important;
    opacity: 1 !important;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-setting-row input.vm-conditional-input:not(.hidden) {
    background-color: #fff !important;
    color: var(--v4-text, #0E2749) !important;
    border-color: #C6D3E1 !important;
    cursor: text !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* --- 14.T  Delivery warning: a mailbox that keeps its messages and
 *          emails nobody can fill up (voicemail.php, feedback 704).
 *          The FIELD HINT --warn look (entity_shared.css), one line
 *          under the Delivery rows. --- */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-delivery-warning {
    max-width: 584px; /* ends with the fields: 14.G's label and field columns, 240 + 16 + 328 */
    margin: 6px 0 0;
    font: 500 12px/17px "Plus Jakarta Sans", system-ui, sans-serif;
    color: #B45309;
}
body.v4-body .v4-content [id$="_app"] #voicemail-tab .vm-delivery-warning[hidden] {
    display: none;
}


/* ============================================================
 * § 15 — UI POLISH PASS (2026-05-26)
 *
 * System-wide consistency fixes:
 *   A. Voicemail tab header description
 *   B. Voicemail section divider line shortening
 *   C. Submenu header redesign
 *   D. Anonymous Rejection card wrapper
 *   E. Card border-radius normalization
 *   F. Card width normalization
 * ============================================================ */


/* --- 15.B  Voicemail section desc divider shortening ---
     The desc::after hairline on voicemail sections should be
     shorter than the full-width default to match the content. */
body.v4-body .v4-content [id$="_app"] #voicemail-tab .aa-vm-section .aa-subsection-header .v4-section-desc::after {
    width: 480px;
    max-width: 100%;
}

/* --- 15.C  Submenu header polish ---
     entity_shared.css sets display:grid on .aa-submenu-header with
     two-ID specificity (#auto_attendant_app #submenu). We work WITH
     the grid rather than fighting it. Name + delete on row 1,
     desc spans all columns on row 2. */
body.v4-body .v4-content [id$="_app"] .aa-submenu-header .v4-submenu-name {
    font: 700 18px/1.3 "Plus Jakarta Sans", system-ui, sans-serif !important;
    color: var(--v4-navy, #0E2749) !important;
}
/* Desc spans all grid columns on row 2 */
body.v4-body .v4-content [id$="_app"] .aa-submenu-header .v4-submenu-desc {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    color: var(--v4-text-secondary, #4F5B6E);
    font: 500 13px/1.45 "Plus Jakarta Sans", system-ui, sans-serif;
    margin: -3px 0 0;
    padding-bottom: 0;
    border-bottom: none;
}
/* Hide the rename-form col and old arrow from decorated headers */
body.v4-body .v4-content [id$="_app"] .aa-submenu-header.v4-submenu-decorated > .col-sm-2 {
    display: none !important;
}
/* Kill toggle arrow: both img and the dropdown chevron pseudo */
body.v4-body .v4-content [id$="_app"] .aa-submenu-header.v4-submenu-decorated .submenu-toggler img,
body.v4-body .v4-content [id$="_app"] .aa-submenu-header.v4-submenu-decorated .submenu-toggler .submenu_toggler_icon {
    display: none !important;
}
/* Force delete column to row 1 right side (same row as name) */
body.v4-body .v4-content [id$="_app"] .aa-submenu-header.v4-submenu-decorated > .col-sm-1 {
    grid-row: 1 !important;
    grid-column: 3 !important;
    justify-content: flex-end !important;
}
/* Reduce submenu body bottom padding */
body.v4-body .v4-content [id$="_app"] .aa-submenu-body {
    padding-bottom: 4px !important;
}
/* Tighter gap between submenu header and first Greeting card */
body.v4-body #v4-app .v4-content [id$="_app"] .aa-submenu-layout > .form-group.notify_section:first-child {
    margin-top: 14px !important;
}


/* --- 15.E  Card border-radius normalization ---
     Unified 8px radius across all entity cards system-wide. */
body.v4-body .v4-content [id$="_app"] .aa-unified-shell--voicemail,
body.v4-body .v4-content [id$="_app"] .setting_section,
body.v4-body .v4-content [id$="_app"] .setting_box {
    border-radius: var(--aa-flat-section-radius, 8px) !important;
}
/* Pre-alert and its inner cards */
body.v4-body .v4-content [id$="_app"] #pre-alert .aa-prealert-announcement-card {
    border-radius: var(--aa-flat-section-radius, 8px) !important;
}

/* --- 15.F  Card width normalization ---
     Ensure content fills the parent consistently. */
body.v4-body .v4-content [id$="_app"] .aa-unified-shell--voicemail {
    width: 100% !important;
    max-width: 100% !important;
}

/* ═══════════════════════════════════════════════════════════════
   15.G  Call Forwarding Selective — card polish
   Each rule gets a clean bordered card. Header, fields, schedule,
   and delete button all get proper treatment.
   ═══════════════════════════════════════════════════════════════ */

/* --- CFS wrapper: tighter inner padding for the rule area --- */
body.v4-body .v4-content [id$="_app"] #call_forwarding_selective .call_forwarding_selective_content_section {
    padding: 4px 0 0 !important;
}


/* --- Delete button (proportionate, matches submenu pattern) --- */
body.v4-body .v4-content [id$="_app"] #call_forwarding_selective .aa-cfs-card .aa-cfs-card-delete-wrap {
    flex: 0 0 auto !important;
}
/* The delete button takes the REPEAT CARD DELETE canon (entity_shared.css). */


/* The "+ Add rule" button takes the HEADER ADD BUTTON canon in entity_shared.css. */

/* ================================================================
 * OFFICE ANYWHERE — data-entry module
 *
 * Mirrors the voicemail Delivery / Caller Options grid layout
 * so OA fields (Enabled, Phone Number, Answer Confirmation)
 * align the same way: label | input | control.
 *
 * Classes come from office_anywhere_numbers.php (extension
 * personal_settings partial). All styling lives HERE, not in
 * any entity-specific CSS file.
 * ================================================================ */

/* --- OA layout container ---------------------------------------- */
body.v4-body .v4-content :is(#office_anywhere, #sequential_ring, #call_notify, #missed_call_email, #simultaneous_ring, #call_forwarding_no_answer, #call_forwarding_busy, #priority_alert, #selective_rejection, #call_forwarding_always, #do_not_disturb, #call_waiting, #calling_line_id_blocking, #call_recording, #push_to_talk, #call_park, #directed_call_pickup, #barge_in, #busy_lamp, #assistance, #departments) .aa-oa-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* --- OA card wrapper -------------------------------------------- */
body.v4-body .v4-content :is(#office_anywhere, #sequential_ring, #call_notify, #missed_call_email, #simultaneous_ring, #call_forwarding_no_answer, #call_forwarding_busy, #priority_alert, #selective_rejection, #call_forwarding_always, #do_not_disturb, #call_waiting, #calling_line_id_blocking, #call_recording, #push_to_talk, #call_park, #directed_call_pickup, #barge_in, #busy_lamp, #assistance, #departments) :is(.aa-office-anywhere-card, .aa-sequential-ring-card, .aa-sim-ring-destination) {
    padding: 0;
    margin: 0;
}

body.v4-body .v4-content :is(#office_anywhere, #sequential_ring, #call_notify, #missed_call_email, #simultaneous_ring, #call_forwarding_no_answer, #call_forwarding_busy, #priority_alert, #selective_rejection, #call_forwarding_always, #do_not_disturb, #call_waiting, #calling_line_id_blocking, #call_recording, #push_to_talk, #call_park, #directed_call_pickup, #barge_in, #busy_lamp, #assistance, #departments) :is(.aa-office-anywhere-card, .aa-sequential-ring-card, .aa-sim-ring-destination).clone {
    display: none;
}

/* --- Card separator (between multiple numbers) ---
 * Visually distinct from the section header line: a short
 * centered rule with extra breathing room. Only appears
 * between adjacent visible cards. */
body.v4-body .v4-content :is(#office_anywhere, #sequential_ring, #call_notify, #missed_call_email, #simultaneous_ring, #call_forwarding_no_answer, #call_forwarding_busy, #priority_alert, #selective_rejection, #call_forwarding_always, #do_not_disturb, #call_waiting, #calling_line_id_blocking, #call_recording, #push_to_talk, #call_park, #directed_call_pickup, #barge_in, #busy_lamp, #assistance, #departments) :is(.aa-office-anywhere-card, .aa-sequential-ring-card, .aa-sim-ring-destination):not(.clone) + :is(.aa-office-anywhere-card, .aa-sequential-ring-card, .aa-sim-ring-destination):not(.clone) {
    position: relative;
    margin-top: 8px;
    padding-top: 16px;
}
body.v4-body .v4-content :is(#office_anywhere, #sequential_ring, #call_notify, #missed_call_email, #simultaneous_ring, #call_forwarding_no_answer, #call_forwarding_busy, #priority_alert, #selective_rejection, #call_forwarding_always, #do_not_disturb, #call_waiting, #calling_line_id_blocking, #call_recording, #push_to_talk, #call_park, #directed_call_pickup, #barge_in, #busy_lamp, #assistance, #departments) :is(.aa-office-anywhere-card, .aa-sequential-ring-card, .aa-sim-ring-destination):not(.clone) + :is(.aa-office-anywhere-card, .aa-sequential-ring-card, .aa-sim-ring-destination):not(.clone)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px dotted #D0D9E6;
}

/* --- Card header (icon + title + desc + delete) -----------------
 * Grid layout: title row (col 1) + delete (col 2),
 * desc row spans both columns below. */
body.v4-body .v4-content :is(#office_anywhere, #sequential_ring, #call_notify, #missed_call_email, #simultaneous_ring, #call_forwarding_no_answer, #call_forwarding_busy, #priority_alert, #selective_rejection, #call_forwarding_always, #do_not_disturb, #call_waiting, #calling_line_id_blocking, #call_recording, #push_to_talk, #call_park, #directed_call_pickup, #barge_in, #busy_lamp, #assistance, #departments) :is(.aa-office-anywhere-header, .aa-sequential-ring-header, .aa-sim-ring-header) {
    display: grid !important;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0;
    margin: 0 0 6px;
    padding: 0;
}

body.v4-body .v4-content :is(#office_anywhere, #sequential_ring, #call_notify, #missed_call_email, #simultaneous_ring, #call_forwarding_no_answer, #call_forwarding_busy, #priority_alert, #selective_rejection, #call_forwarding_always, #do_not_disturb, #call_waiting, #calling_line_id_blocking, #call_recording, #push_to_talk, #call_park, #directed_call_pickup, #barge_in, #busy_lamp, #assistance, #departments) :is(.aa-office-anywhere-header, .aa-sequential-ring-header, .aa-sim-ring-header) .aa-inline-subsection-title {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

body.v4-body .v4-content :is(#office_anywhere, #sequential_ring, #call_notify, #missed_call_email, #simultaneous_ring, #call_forwarding_no_answer, #call_forwarding_busy, #priority_alert, #selective_rejection, #call_forwarding_always, #do_not_disturb, #call_waiting, #calling_line_id_blocking, #call_recording, #push_to_talk, #call_park, #directed_call_pickup, #barge_in, #busy_lamp, #assistance, #departments) :is(.aa-office-anywhere-title, .aa-sequential-ring-title, .aa-sim-ring-title) {
    font: 700 14px/1.3 "Plus Jakarta Sans", system-ui, sans-serif !important;
    color: var(--v4-navy, #0E2749) !important;
    letter-spacing: 0.015em !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* JS-injected icon inside the label */
body.v4-body .v4-content :is(#office_anywhere, #sequential_ring, #call_notify, #missed_call_email, #simultaneous_ring, #call_forwarding_no_answer, #call_forwarding_busy, #priority_alert, #selective_rejection, #call_forwarding_always, #do_not_disturb, #call_waiting, #calling_line_id_blocking, #call_recording, #push_to_talk, #call_park, #directed_call_pickup, #barge_in, #busy_lamp, #assistance, #departments) :is(.aa-office-anywhere-title, .aa-sequential-ring-title, .aa-sim-ring-title) .v4-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--v4-brand-orange, #F89939);
    flex-shrink: 0;
}
body.v4-body .v4-content :is(#office_anywhere, #sequential_ring, #call_notify, #missed_call_email, #simultaneous_ring, #call_forwarding_no_answer, #call_forwarding_busy, #priority_alert, #selective_rejection, #call_forwarding_always, #do_not_disturb, #call_waiting, #calling_line_id_blocking, #call_recording, #push_to_talk, #call_park, #directed_call_pickup, #barge_in, #busy_lamp, #assistance, #departments) :is(.aa-office-anywhere-title, .aa-sequential-ring-title, .aa-sim-ring-title) .v4-section-icon svg {
    width: 18px;
    height: 18px;
}

/* JS-injected description under the card title — inherits base
   .v4-section-desc font/color/margin from line 4076; only grid
   positioning is overridden here. */
body.v4-body .v4-content :is(#office_anywhere, #sequential_ring, #call_notify, #missed_call_email, #simultaneous_ring, #call_forwarding_no_answer, #call_forwarding_busy, #priority_alert, #selective_rejection, #call_forwarding_always, #do_not_disturb, #call_waiting, #calling_line_id_blocking, #call_recording, #push_to_talk, #call_park, #directed_call_pickup, #barge_in, #busy_lamp, #assistance, #departments) :is(.aa-office-anywhere-header, .aa-sequential-ring-header, .aa-sim-ring-header) .v4-section-desc {
    grid-column: 1 / -1;
    grid-row: 2;
    border-bottom: 0;
}

/* Delete button — same row as title, right side */
body.v4-body .v4-content :is(#office_anywhere, #sequential_ring, #call_notify, #missed_call_email, #simultaneous_ring, #call_forwarding_no_answer, #call_forwarding_busy, #priority_alert, #selective_rejection, #call_forwarding_always, #do_not_disturb, #call_waiting, #calling_line_id_blocking, #call_recording, #push_to_talk, #call_park, #directed_call_pickup, #barge_in, #busy_lamp, #assistance, #departments) :is(.aa-office-anywhere-delete-wrap, .aa-sequential-ring-delete-wrap, .aa-sim-ring-delete-wrap) {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
}

/* The delete button takes the REPEAT CARD DELETE canon (entity_shared.css). */


/* --- Data-entry settings area ----------------------------------- */
/* The settings rows (.aa-oa-settings-area, .aa-oa-field-row, label, input,
   control, schedule section, the tagsinput fields) are ONE class-based rule
   set in entity_shared.css ("SETTINGS ROW"). The id-list copy that lived
   here until 2026-09-15 left every newer card without it. */

/* ============================================================
 * § 13 — GREETINGS DETAIL PAGE
 * ------------------------------------------------------------
 * Standalone greeting detail view at /greetings/<name>/.
 * Layout, header, cards, and usage list.
 * ============================================================ */

.v4-greeting-detail {
    max-width: 1180px;
    margin: 0 auto;
    padding: 8px 0 48px;
}

.v4-greeting-detail-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 22px;
}

.v4-greeting-detail-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #DCE6F1;
    border-radius: 6px;
    color: #102A4C;
    background: #FFFFFF;
    text-decoration: none;
}

.v4-greeting-detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid #FFD9B4;
    border-radius: 12px;
    color: #F28A1A;
    background: #FFF8F0;
}

.v4-greeting-detail-icon svg {
    width: 23px;
    height: 23px;
}

.v4-greeting-detail-title h1 {
    margin: 0;
    color: #102A4C;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

.v4-greeting-detail-title div {
    margin-top: 4px;
    color: #7186A4;
    font-size: 14px;
}

.v4-greeting-detail-card {
    border: 1px solid #DDE7F1;
    border-radius: 8px;
    background: #FFFFFF;
    padding: 24px 28px 18px;
    margin-bottom: 16px;
}

.v4-greeting-detail-card h2 {
    margin: 0 0 6px;
    color: #061A33;
    font-size: 18px;
    font-weight: 800;
}

.v4-greeting-detail-card p {
    margin: 0 0 16px;
    color: #7186A4;
    font-size: 13px;
    line-height: 1.45;
}

.v4-greeting-usage-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.v4-greeting-usage-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #E9ECEF;
    border-radius: 8px;
    background: #FFFFFF;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
    margin-bottom: 6px;
}

.v4-greeting-usage-item:hover {
    border-color: #FF932E;
}

.v4-greeting-usage-item svg {
    margin-left: auto;
    color: #B0BFCF;
    flex-shrink: 0;
}

.v4-greeting-usage-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #EFF3F7;
    color: #4A6180;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.v4-greeting-usage-name {
    color: #102A4C;
    font-size: 14px;
    font-weight: 600;
}

.v4-greeting-usage-type {
    color: #7186A4;
    font-size: 12px;
    margin-top: 2px;
}

.v4-greeting-usage-empty {
    padding: 20px 16px;
    text-align: center;
    color: #7186A4;
    font-size: 13px;
}

.v4-greeting-usage-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: #7186A4;
    font-size: 13px;
    gap: 8px;
}

.v4-greeting-usage-spinner svg {
    animation: v4-spin 1s linear infinite;
}

@keyframes v4-spin {
    100% { transform: rotate(360deg); }
}

.v4-greeting-feature-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: auto;
    flex-shrink: 0;
}

.v4-greeting-feature-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    background: #FFF8F0;
    border: 1px solid #FFD9B4;
    color: #D97E1F;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* The Greetings page's Save and Cancel wear the Add modal's .v4-add-submit /
   .v4-add-cancel (v4_shell.css), with a .v4-add-status line for a refusal,
   the row the schedule page and Music on Hold use (2026-09-24; this bar
   drew its own buttons, centred). */
.v4-greeting-detail-save-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 0 8px;
}

/* ============================================================
 * § 16 — PARTS OF A LIST SLOT (2026-09-17)
 *
 * A call center's hold music (and its entrance and comfort messages) plays
 * up to four recordings in order. The template renders parts 2 to 4 under
 * the slot's own recorder inside .greeting-parts; each part is the shared
 * recorder block with a small head (Part N, Remove) above it. Hidden while
 * empty, revealed by the add link. greeting.js owns the behaviour.
 * ============================================================ */
/* A recorder that CLOSES a settings card (the call center's entrance and
   comfort messages, its hold music with the parts under it) ends with the
   body-end 8px, so its last line stands the same 29px off the frame as the
   last line of every other card (THE CARD'S AIR, entity_shared.css; these
   three stood at 21). A recorder with something after it (the pre-alert's
   schedule, the voicemail's next section) is not the last child and keeps
   its own rhythm. */
body.v4-body .v4-content .aa-call-feature .aa-vm-section:last-child > .voicemail-greeting-area:last-child {
    padding-bottom: var(--vt-card-body-end, 8px);
}
.greeting-parts {
    margin: 12px 0 0 0;
    /* The recorder area is a flex column and the slot's own .greeting block
       sits at order 2 (the normalizer's layout); the parts come after it. */
    order: 3;
}
.greeting-parts-summary {
    font-size: 13px;
    color: #4A5568;
    margin: 0 0 8px 0;
}
.greeting-part {
    border-top: 1px solid #F0F1F4;
    padding-top: 10px;
    margin-top: 10px;
}
.greeting-part-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.greeting-part-title {
    font-size: 13px;
    font-weight: 600;
    color: #0E2749;
}
.greeting-part-note {
    font-weight: 400;
    color: #4A5568;
    margin-left: 6px;
}
.greeting-part-remove,
.greeting-parts-add {
    font-size: 13px;
    font-weight: 600;
    color: #F89939;
    cursor: pointer;
    text-decoration: none;
}
.greeting-part-remove:hover,
.greeting-parts-add:hover {
    color: #EC8526;
    text-decoration: none;
}
.greeting-parts-add {
    display: inline-block;
    margin-top: 10px;
}
