/* Add/Edit integration: full-page 3-step wizard shell. */

.iafwzdesk-hidden {
    display: none;
}

.iafwzdesk-wizard-topbar {
    margin-bottom: 16px;
}

.iafwzdesk-wizard-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--iafwzdesk-border-200, #e4e6ef);
    border-radius: var(--iafwzdesk-radius-sm, 8px);
    background: var(--iafwzdesk-card-bg, #fff);
    color: var(--iafwzdesk-body-text, #4a4f66);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.iafwzdesk-wizard-back-link:hover {
    color: var(--iafwzdesk-ink, #1b1d2a);
}

.iafwzdesk-wizard-card {
    background: var(--iafwzdesk-card-bg, #fff);
    border: 1px solid var(--iafwzdesk-border-100, #eceef5);
    border-radius: var(--iafwzdesk-radius-md, 14px);
    box-shadow: var(--iafwzdesk-shadow-card, 0 4px 16px rgba(20, 22, 50, .04));
    overflow: hidden;
}

/* ── Step indicator ── */

.iafwzdesk-wizard-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    border-bottom: 1px solid var(--iafwzdesk-border-100, #eceef5);
    flex-wrap: wrap;
}

.iafwzdesk-wizard-step {
    display: flex;
    align-items: center;
    gap: 10px;
}

.iafwzdesk-wizard-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--iafwzdesk-border-300, #f1f2f7);
    color: var(--iafwzdesk-muted-text, #8a8fa6);
    font-size: 13px;
    font-weight: 800;
}

.iafwzdesk-wizard-step-active .iafwzdesk-wizard-step-num {
    background: var(--iafwzdesk-primary-grad-end, #6a4cf0);
    color: #fff;
}

.iafwzdesk-wizard-step-done .iafwzdesk-wizard-step-num {
    background: var(--iafwzdesk-success, #10b981);
    color: #fff;
}

.iafwzdesk-wizard-step-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.iafwzdesk-wizard-step-eyebrow {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--iafwzdesk-muted-text, #8a8fa6);
}

.iafwzdesk-wizard-step-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--iafwzdesk-muted-text, #8a8fa6);
}

.iafwzdesk-wizard-step-active .iafwzdesk-wizard-step-title,
.iafwzdesk-wizard-step-done .iafwzdesk-wizard-step-title {
    color: var(--iafwzdesk-ink, #1b1d2a);
}

.iafwzdesk-wizard-step-line {
    width: 48px;
    height: 1px;
    background: var(--iafwzdesk-border-200, #e4e6ef);
    flex-shrink: 0;
}

/* ── Panels ── */

.iafwzdesk-wizard-panel {
    padding: 28px 24px;
}

.iafwzdesk-wizard-step1-card {
    max-width: 600px;
    margin: 0 auto;
}

.iafwzdesk-wizard-step1-card .iafwzdesk-setup-table {
    margin-top: 0;
}

.iafwzdesk-setup-th-spacer {
    border: none;
    background: none;
}

/* ── Footer (Back / Continue / Save) ── */

.iafwzdesk-wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--iafwzdesk-border-100, #eceef5);
}

.iafwzdesk-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--iafwzdesk-border-200, #e4e6ef);
    border-radius: var(--iafwzdesk-radius-sm, 8px);
    background: var(--iafwzdesk-card-bg, #fff);
    color: var(--iafwzdesk-body-text, #4a4f66);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}

.iafwzdesk-btn-secondary:hover {
    color: var(--iafwzdesk-ink, #1b1d2a);
}

.iafwzdesk-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 782px) {
  .iafwzdesk-wizard-panel {
        padding: 20px 16px;
    }
}

/* ============================================================
 * Reference-design redesign of the wizard's own form controls
 * (Steps 1-3). The shell above (stepper/card/footer) already matched;
 * everything below restyles the fields/table/cards inside it and skins
 * the <select> elements with the shared searchable-dropdown component
 * (see iafwzdesk-select-skin.js).
 * ============================================================ */

/* ── Help tooltip: align to the shared dark-bubble look ── */

.iafwzdesk-help-icon-wrapper {
    display: inline-flex;
    vertical-align: middle;
}

.iafwzdesk-help-icon {
    width: 15px;
    height: 15px;
    line-height: 15px;
    font-size: 10px;
    background: var(--iafwzdesk-border-300, #f1f2f7);
    color: var(--iafwzdesk-muted-text, #8a8fa6);
}

.iafwzdesk-help-icon-wrapper:hover .iafwzdesk-help-icon {
    background: var(--iafwzdesk-lavender-100, #ebe5ff);
    color: var(--iafwzdesk-primary-grad-end, #6a4cf0);
}

.iafwzdesk-help-tooltip {
    background: var(--iafwzdesk-ink, #1b1d2a) !important;
    border-radius: var(--iafwzdesk-radius-sm, 10px);
    font-family: var(--iafwzdesk-font);
    width: 270px !important;
}

.iafwzdesk-help-tooltip::after {
    border-color: var(--iafwzdesk-ink, #1b1d2a) transparent transparent transparent !important;
}

/* ── Step 1 fields ── */

.iafwzdesk-wizard-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 18px;
}

.iafwzdesk-wizard-field:last-child {
    margin-bottom: 0;
}

.iafwzdesk-wizard-field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--iafwzdesk-ink, #1b1d2a);
}

.iafwzdesk-required {
    color: var(--iafwzdesk-error, #e0393e);
}

.iafwzdesk-wizard-field .iafwzdesk-input,
.iafwzdesk-wizard-field select.iafwzdesk-input {
    width: 100%;
}

/* ── Shared searchable-dropdown skin (button + floating panel) ──
   Used for Step 1's destination fields, Step 2/3's field pickers, and the
   Attachments multi-select (.iafwzdesk-multi-combo reuses the same classes). */

.iafwzdesk-skin-combo {
    position: relative;
    width: 100%;
}

.iafwzdesk-skin-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--iafwzdesk-border-200, #e4e6ef);
    border-radius: var(--iafwzdesk-radius-sm, 10px);
    background: var(--iafwzdesk-card-bg, #fff);
    font-family: var(--iafwzdesk-font);
    font-size: 13.5px;
    color: var(--iafwzdesk-ink, #1b1d2a);
    cursor: pointer;
    text-align: left;
}

.iafwzdesk-skin-btn:hover {
    border-color: var(--iafwzdesk-lavender-border-300, #c9bdfb);
}

.iafwzdesk-skin-combo.iafwzdesk-skin-error .iafwzdesk-skin-btn {
    border-color: var(--iafwzdesk-error, #e0393e);
    box-shadow: 0 0 0 3px var(--iafwzdesk-error-bg, #fdecec);
}

.iafwzdesk-skin-btn:disabled {
    cursor: default;
    opacity: 0.85;
}

.iafwzdesk-skin-btn-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.iafwzdesk-skin-btn-placeholder {
    color: var(--iafwzdesk-muted-text-2, #9aa0b4);
    font-weight: 400;
}

.iafwzdesk-skin-badge {
    flex-shrink: 0;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--iafwzdesk-error, #e0393e);
    background: var(--iafwzdesk-error-bg, #fdecec);
    border-radius: 5px;
    padding: 2px 6px;
}

.iafwzdesk-skin-lock,
.iafwzdesk-skin-chevron {
    display: none;
    flex-shrink: 0;
    color: var(--iafwzdesk-muted-text, #8a8fa6);
}

.iafwzdesk-skin-combo.iafwzdesk-skin-locked .iafwzdesk-skin-lock {
    display: flex;
}

.iafwzdesk-skin-combo.iafwzdesk-skin-locked .iafwzdesk-skin-btn {
    background: var(--iafwzdesk-border-300, #f1f2f7);
    border-style: dashed;
}

.iafwzdesk-skin-panel,
.iafwzdesk-multi-combo .iafwzdesk-skin-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: var(--iafwzdesk-card-bg, #fff);
    border: 1px solid var(--iafwzdesk-lavender-border-200, #e3dcfc);
    border-radius: var(--iafwzdesk-radius-sm, 12px);
    box-shadow: var(--iafwzdesk-shadow-menu, 0 18px 40px -12px rgba(30, 30, 70, .28));
    z-index: 120;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.iafwzdesk-skin-panel[hidden] {
    display: none;
}

.iafwzdesk-skin-search-wrap {
    position: relative;
}

.iafwzdesk-skin-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--iafwzdesk-muted-text-2, #9aa0b4);
    display: flex;
    pointer-events: none;
}

.iafwzdesk-skin-search {
    width: 100%;
    box-sizing: border-box;
    height: 36px;
    padding: 0 10px 0 34px;
    border: 1px solid var(--iafwzdesk-border-100, #e9ebf2);
    border-radius: 8px;
    background: var(--iafwzdesk-page-bg, #f8f9fc);
    font-family: var(--iafwzdesk-font);
    font-size: 13.5px;
    color: var(--iafwzdesk-ink, #1b1d2a);
    outline: none;
}

.iafwzdesk-skin-search:focus {
    border-color: var(--iafwzdesk-lavender-border-300, #c9bdfb);
    background: #fff;
}

.iafwzdesk-skin-list {
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.iafwzdesk-skin-group-label {
    padding: 10px 10px 4px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--iafwzdesk-muted-text, #7a7f96);
}

.iafwzdesk-skin-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    text-align: left;
}

.iafwzdesk-skin-option:hover {
    background: var(--iafwzdesk-lavender-300, #f6f4fe);
}

.iafwzdesk-skin-option.is-selected {
    background: var(--iafwzdesk-lavender-200, #f1edff);
}

.iafwzdesk-skin-option-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.iafwzdesk-skin-option-disabled:hover {
    background: none;
}

.iafwzdesk-skin-option-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.iafwzdesk-skin-option-label {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--iafwzdesk-ink, #1b1d2a);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.iafwzdesk-skin-option.is-selected .iafwzdesk-skin-option-label {
    font-weight: 700;
}

.iafwzdesk-skin-option-sub {
    font-size: 11.5px;
    color: var(--iafwzdesk-muted-text-2, #9aa0b4);
}

.iafwzdesk-pro-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin: 0 4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #f5a623;
    color: #ffffff;
    font-size: 8px;
    line-height: 1.5;
    font-weight: 800;
    letter-spacing: .3px;
    text-transform: uppercase;
    vertical-align: middle;
}

/* The connection popup of the wizard: why the sign-in failed (same look as on the Connections page). */

/* One PRO badge for the whole "Add additional details" section, next to its help icon. */

/* Notes / Tags / Attachments without a Pro license: shown but locked. */

.iafwzdesk-skin-option-pro {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f5a623;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.iafwzdesk-skin-option-check {
    flex-shrink: 0;
    color: var(--iafwzdesk-primary-grad-end, #6a4cf0);
    display: flex;
}

.iafwzdesk-skin-empty {
    padding: 18px 10px;
    text-align: center;
    font-size: 13px;
    color: var(--iafwzdesk-muted-text-2, #9aa0b4);
}

/* ── Step 2: field-mapping table ── */

.iafwzdesk-fm-card {
    background: var(--iafwzdesk-card-bg, #fff);
    border: 1px solid var(--iafwzdesk-border-100, #eceef5);
    border-radius: var(--iafwzdesk-radius-md, 14px);
    overflow: hidden;
}

.iafwzdesk-fm-table {
    width: 100%;
    border-collapse: collapse;
}

.iafwzdesk-fm-table thead th.iafwzdesk-setup-th {
    background: var(--iafwzdesk-lavender-100, #ebe5ff);
    color: var(--iafwzdesk-primary-text-hover, #4b31c9);
    text-transform: uppercase;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: left;
    padding: 10px 14px;
}

.iafwzdesk-fm-table thead th.iafwzdesk-setup-th-spacer {
    background: var(--iafwzdesk-lavender-100, #ebe5ff);
    width: 84px;
}

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td {
    vertical-align: middle;
    padding: 7px 14px;
    position: relative;
}

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td:nth-child(3) {
    padding-left: 0;
}

/* Reserved via the first column's own right padding (not a table-wide
   border-spacing gap, which would also split the solid header bar above
   into two separate blocks) - no extra <td> needed, so
   iafwzdesk_addRow()/iafwzdesk_buildZohoSelect() don't have to change how many
   cells a row has. */

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td:first-child {
    padding-right: 34px;
}

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td:first-child::after {
    content: "\2192";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--iafwzdesk-muted-text, #8a8fa6);
    font-size: 15px;
    pointer-events: none;
}

.iafwzdesk-fm-table tbody tr:not(:last-child) td.iafwzdesk-setup-td {
    border-bottom: 1px solid var(--iafwzdesk-border-300, #f4f5f9);
}

.iafwzdesk-fm-td-actions {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

.iafwzdesk-fm-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 !important;
    border: 1px solid var(--iafwzdesk-border-200, #e4e6ef);
    border-radius: 8px;
    background: var(--iafwzdesk-card-bg, #fff);
    color: var(--iafwzdesk-body-text, #6b7085);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.iafwzdesk-fm-icon-btn:hover:not(:disabled) {
    border-color: var(--iafwzdesk-lavender-border-300, #c9bdfb);
    color: var(--iafwzdesk-primary-grad-end, #6a4cf0);
    background: #faf8ff;
}

.iafwzdesk-fm-icon-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.iafwzdesk-fm-icon-btn-danger:hover:not(:disabled) {
    border-color: #f5c2c2;
    color: var(--iafwzdesk-error, #e0393e);
    background: #fff7f7;
}

.iafwzdesk-fm-icon-btn-locked {
    cursor: default;
    color: var(--iafwzdesk-muted-text-2, #9aa0b4);
}

/* Legacy classes the field-mapping JS still builds elements with
   (iafwzdesk-fm-setup-select, custom-value input/suggestions) - sized to sit
   inside the new skinned layout instead of the old fixed 200px boxes. */

.iafwzdesk-setup-fm-custom-wrap,
div:has(> .iafwzdesk-setup-fm-custom-input) {
    margin-top: 8px;
}

.iafwzdesk-setup-fm-custom-input {
    width: 100% !important;
    max-width: none !important;
    height: 42px !important;
    min-height: 42px !important;
    border: 1px solid var(--iafwzdesk-border-200, #e4e6ef) !important;
    border-radius: var(--iafwzdesk-radius-sm, 10px) !important;
    color: var(--iafwzdesk-ink, #1b1d2a) !important;
    font-family: var(--iafwzdesk-font);
    padding: 0 12px !important;
}

/* ── Step 2: Add additional details ── */

/* ── Tags chip input ── */

/* ── Step 3: Record action card ── */

/* A Pro-only action without a licence: the text and dot are dimmed, the PRO badge stays clear. */

/* The label's distance to the dropdown is its own margin: jQuery's show() makes the area a block, where a flex gap would be lost. */

/* ── Step 3: Filters card ── */

.iafwzdesk-filters-card {
    border: 1px solid var(--iafwzdesk-border-100, #eceef5);
    border-radius: var(--iafwzdesk-radius-md, 16px);
}

.iafwzdesk-filters-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
}

.iafwzdesk-setup-filter-content {
    border-top: 1px solid var(--iafwzdesk-border-100, #f1f2f7) !important;
    padding: 14px 18px !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Hidden until the filter toggle is switched on (setup-filter.js then sets display inline). */

.iafwzdesk-setup-filter-content.iafwzdesk-hidden {
    display: none;
}

.iafwzdesk-filter-columns-label {
    display: flex;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--iafwzdesk-primary-text, #6b5bb8);
    text-transform: uppercase;
    padding: 0 2px;
}

.iafwzdesk-filter-columns-label span {
    flex: 1 1 300px;
}

.iafwzdesk-filter-columns-label span:last-child {
    flex: 0 0 74px;
}

.iafwzdesk-setup-filter-clear-all {
    align-self: flex-end;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--iafwzdesk-primary-text, #5b3fe0) !important;
}

.iafwzdesk-setup-filter-field,
.iafwzdesk-setup-filter-condition {
    display: none;
}

.iafwzdesk-setup-filter-row .iafwzdesk-skin-combo {
    flex: 1 1 300px;
}

.iafwzdesk-setup-filter-value,
.iafwzdesk-setup-filter-logic-select {
    font-family: var(--iafwzdesk-font);
    height: 42px !important;
    border: 1px solid var(--iafwzdesk-border-200, #e4e6ef) !important;
    border-radius: var(--iafwzdesk-radius-sm, 10px) !important;
    font-size: 13.5px !important;
    color: var(--iafwzdesk-ink, #1b1d2a);
    padding: 0 12px !important;
}

.iafwzdesk-setup-filter-logic-select {
    width: auto !important;
    flex: 0 0 auto;
}

.iafwzdesk-setup-filter-actions {
    flex: 0 0 74px;
}

.iafwzdesk-setup-filter-add-icon,
.iafwzdesk-setup-filter-close-icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    background: var(--iafwzdesk-card-bg, #fff) !important;
    border: 1px solid var(--iafwzdesk-border-200, #e4e6ef) !important;
    color: var(--iafwzdesk-body-text, #6b7085) !important;
}

.iafwzdesk-setup-filter-add-icon:hover {
    border-color: var(--iafwzdesk-lavender-border-300, #c9bdfb) !important;
    color: var(--iafwzdesk-primary-grad-end, #6a4cf0) !important;
    background: #faf8ff !important;
}

.iafwzdesk-setup-filter-close-icon:hover {
    border-color: #f5c2c2 !important;
    color: var(--iafwzdesk-error, #e0393e) !important;
    background: #fff7f7 !important;
}

@media (max-width: 680px) {
  .iafwzdesk-setup-filter-row {
        flex-wrap: wrap !important;
    }
  .iafwzdesk-filter-columns-label {
        display: none;
    }
}

/* ============================================================
 * Reference-design polish for the wizard shell + Step 1
 * (design_handoff_zoho_admin_ui "Integration editor page").
 * Declared last so it wins over setup-fm.css / help.css defaults.
 * ============================================================ */

.iafwzdesk-wizard-topbar { margin-bottom: 22px; }

.iafwzdesk-wizard-back-link {
    height: 38px;
    padding: 0 14px 0 10px;
    border-radius: 10px;
    font-size: 14px;
    gap: 8px;
}

.iafwzdesk-wizard-back-link:hover {
    border-color: #c9bdfb;
    color: #6a4cf0;
}

.iafwzdesk-wizard-card {
    border-radius: 18px;
    border-color: #eceef5;
    box-shadow: 0 4px 16px rgba(20, 22, 50, .04);
    overflow: visible;
}

/* Stepper bar */

.iafwzdesk-wizard-stepper {
    flex-wrap: nowrap;
    gap: 0;
    padding: 20px 28px;
    background: #fcfbff;
    border-bottom: 1px solid #f1f2f7;
    border-radius: 18px 18px 0 0;
}

.iafwzdesk-wizard-step { gap: 10px; flex-shrink: 0; }

.iafwzdesk-wizard-step-num {
    width: 32px;
    height: 32px;
    box-sizing: border-box;
    background: #fff;
    border: 2px solid #e6e3f3;
    color: #9aa0b4;
    font-weight: 800;
}

.iafwzdesk-wizard-step-active .iafwzdesk-wizard-step-num {
    background: #6a4cf0;
    border-color: #d8cffc;
    color: #fff;
    box-shadow: 0 0 0 4px #f1edff;
}

.iafwzdesk-wizard-step-done .iafwzdesk-wizard-step-num {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

/* Current step that is also complete: stays green, keeps the highlight ring and purple title. */

.iafwzdesk-wizard-step-active.iafwzdesk-wizard-step-done .iafwzdesk-wizard-step-num {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 0 0 4px #d9f5ea;
}

.iafwzdesk-wizard-step-active.iafwzdesk-wizard-step-done .iafwzdesk-wizard-step-title { color: #6a4cf0; }

.iafwzdesk-wizard-step-text { gap: 1px; }

.iafwzdesk-wizard-step-eyebrow { font-weight: 700; letter-spacing: .07em; color: #9aa0b4; }

.iafwzdesk-wizard-step-title { color: #9aa0b4; white-space: nowrap; }

.iafwzdesk-wizard-step-active .iafwzdesk-wizard-step-title { color: #6a4cf0; }

.iafwzdesk-wizard-step-done .iafwzdesk-wizard-step-title { color: #1b1d2a; }

.iafwzdesk-wizard-step-line {
    flex: 1;
    width: auto;
    min-width: 20px;
    max-width: 150px;
    height: 2px;
    border-radius: 2px;
    margin: 0 16px;
    background: #e6e3f3;
}

.iafwzdesk-wizard-stepper { max-width: none; }

/* Panel + Step 1 card */

.iafwzdesk-wizard-panel { padding: 26px 28px 0; }

.iafwzdesk-wizard-step1-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 600px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 20px 22px;
    border: 1px solid #eceef5;
    border-radius: 16px;
}

.iafwzdesk-wizard-field { gap: 7px; margin-bottom: 0; }

.iafwzdesk-wizard-field-label {
    font-size: 14px;
    font-weight: 500;
    gap: 6px;
}

.iafwzdesk-required { font-weight: 700; margin-left: -3px; }

.iafwzdesk-app .iafwzdesk-wizard-field .iafwzdesk-input,
.iafwzdesk-app .iafwzdesk-wizard-field select.iafwzdesk-input {
    height: 44px;
    max-width: none;
    border-radius: 10px;
    background: #fbfbfe;
    border-color: #e4e6ef;
    font-size: 13px;
}

.iafwzdesk-app .iafwzdesk-wizard-field .iafwzdesk-input:focus {
    background: #fff;
    border-color: #8b6cf8;
    box-shadow: 0 0 0 3px #ece7fe;
}

.iafwzdesk-wizard-field .iafwzdesk-skin-btn {
    height: 44px;
    padding: 0 14px;
    background: #fbfbfe;
    font-size: 13px;
}

.iafwzdesk-wizard-field .iafwzdesk-skin-combo.iafwzdesk-skin-open .iafwzdesk-skin-btn { background: #fff; }

.iafwzdesk-wizard-field .iafwzdesk-skin-combo.iafwzdesk-skin-locked .iafwzdesk-skin-btn {
    border-style: solid;
    opacity: .6;
}

/* Help icon: outlined "?" circle like the reference */

.iafwzdesk-wizard .iafwzdesk-help-icon {
    width: 14px;
    height: 14px;
    font-size: 0;
    line-height: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9adc0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
}

.iafwzdesk-wizard .iafwzdesk-help-icon-wrapper:hover .iafwzdesk-help-icon {
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a4cf0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
}

/* Footer: full-width tinted bar */

.iafwzdesk-wizard-footer {
    margin: 26px -28px 0;
    padding: 14px 28px;
    background: #fcfbff;
    border-top: 1px solid #f1f2f7;
    border-radius: 0 0 18px 18px;
}

.iafwzdesk-wizard .iafwzdesk-btn-primary {
    height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b6cf8, #6a4cf0);
    box-shadow: 0 8px 18px -8px rgba(106, 76, 240, .6);
}

.iafwzdesk-wizard .iafwzdesk-btn-secondary {
    height: 40px;
    border-radius: 10px;
    color: #1b1d2a;
}

.iafwzdesk-wizard .iafwzdesk-btn-secondary:hover { border-color: #c9bdfb; }

.iafwzdesk-wizard .iafwzdesk-btn-primary:disabled { opacity: .5; box-shadow: none; }

@media (max-width: 782px) {
  .iafwzdesk-wizard-stepper { overflow-x: auto; padding: 16px; }
  .iafwzdesk-wizard-panel { padding: 20px 16px 0; }
  .iafwzdesk-wizard-footer { margin: 20px -16px 0; padding: 14px 16px; }
}

/* ── Dropdown panel: match reference (search box, indented group options) ──
   `!important` on the search input: wp-admin's `input[type=text]` rules
   (square border, 5px radius, own padding) otherwise win. */

.iafwzdesk-skin-panel .iafwzdesk-skin-search {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 10px 0 34px !important;
    border: 1px solid #e9ebf2 !important;
    border-radius: 8px !important;
    background: #f8f9fc !important;
    box-shadow: none !important;
    font-size: 13.5px !important;
    color: #1b1d2a !important;
    outline: none !important;
    margin: 0 !important;
}

.iafwzdesk-skin-panel .iafwzdesk-skin-search:focus {
    border-color: #c9bdfb !important;
    background: #fff !important;
}

.iafwzdesk-skin-search-icon { left: 11px; }

.iafwzdesk-skin-search-icon svg { width: 15px; height: 15px; }

.iafwzdesk-skin-list { padding-right: 2px; scrollbar-width: thin; scrollbar-color: #d4d6e2 transparent; }

.iafwzdesk-skin-list::-webkit-scrollbar { width: 6px; }

.iafwzdesk-skin-list::-webkit-scrollbar-button { display: none; height: 0; }

.iafwzdesk-skin-list::-webkit-scrollbar-thumb { background: #d4d6e2; border-radius: 6px; }

.iafwzdesk-skin-list::-webkit-scrollbar-track { background: transparent; }

.iafwzdesk-skin-option { font-family: var(--iafwzdesk-font); }

.iafwzdesk-skin-option-label { font-weight: 400; }

.iafwzdesk-skin-option.is-selected .iafwzdesk-skin-option-label { font-weight: 600; }

.iafwzdesk-skin-option.iafwzdesk-skin-option-grouped { padding-left: 26px; }

/* ── Connection dropdown: logo tile + data-center subtitle + footer action ── */

.iafwzdesk-skin-option-logo {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    border: 1px solid #eceef5;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.iafwzdesk-skin-option-logo img { width: 16px; height: auto; }

.iafwzdesk-skin-panel .iafwzdesk-skin-add {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 -8px -8px;
    padding: 10px 18px;
    border-top: 1px solid #f1f2f7;
    border-radius: 0 0 12px 12px;
    background: transparent;
    color: #6a4cf0;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: none;
}

.iafwzdesk-skin-panel .iafwzdesk-skin-add:hover,
.iafwzdesk-skin-panel .iafwzdesk-skin-add:focus {
    background: #f6f4fe;
    color: #6a4cf0;
    outline: none;
    box-shadow: none;
}

/* ── Footer action is a <button> now (opens the Add connection modal) ── */

.iafwzdesk-skin-panel button.iafwzdesk-skin-add {
    width: calc(100% + 16px);
    border: none;
    border-top: 1px solid #f1f2f7;
    cursor: pointer;
    font-family: var(--iafwzdesk-font);
    text-align: left;
}

.iafwzdesk-skin-lead-icon { display: flex; flex-shrink: 0; color: #6a4cf0; }

/* ── Under the Zoho connection dropdown: Test connection · Reconnect ── */

.iafwzdesk-conn-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-left: 2px;
}

.iafwzdesk-conn-actions.iafwzdesk-hidden { display: none; }

/* "?" beside Refresh from Zoho: the tooltip opens below the icon. */

.iafwzdesk-conn-refresh-help { margin-left: -6px; }

.iafwzdesk-conn-refresh-help .iafwzdesk-help-tooltip {
    top: calc(100% + 8px);
    left: -20px;
    z-index: 20;
    line-height: 1.5;
    white-space: normal;
}

.iafwzdesk-conn-refresh-help .iafwzdesk-help-tooltip::after { display: none; }

.iafwzdesk-conn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: none;
    color: #6a4cf0;
    font-family: var(--iafwzdesk-font);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.iafwzdesk-conn-action:hover { color: #4b31c9; text-decoration: underline; }

.iafwzdesk-conn-action-sep { width: 1px; height: 12px; background: #e4e6ef; }

.iafwzdesk-conn-spinner {
    display: none;
    width: 12px;
    height: 12px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 2px solid #e3dcfc;
    border-top-color: #6a4cf0;
    animation: iafwzdesk-conn-spin .7s linear infinite;
}

.iafwzdesk-conn-action.iafwzdesk-busy { cursor: progress; text-decoration: none; }

.iafwzdesk-conn-action.iafwzdesk-busy .iafwzdesk-conn-action-icon { display: none; }

.iafwzdesk-conn-action.iafwzdesk-busy .iafwzdesk-conn-spinner { display: inline-block; }

@keyframes iafwzdesk-conn-spin { to { transform: rotate(360deg); } }

.iafwzdesk-conn-empty-hint {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 500;
    color: #9a5b00;
}

.iafwzdesk-conn-empty-hint a { font-weight: 700; color: #6a4cf0; text-decoration: none; }

.iafwzdesk-conn-empty-hint a:hover { color: #4b31c9; text-decoration: underline; }

/* ── Add connection modal ── */

.iafwzdesk-conn-field { display: flex; flex-direction: column; gap: 8px; }

.iafwzdesk-conn-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #4a4f66;
}

.iafwzdesk-conn-input-wrap { position: relative; }

.iafwzdesk-conn-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6a4cf0;
    pointer-events: none;
}

.iafwzdesk-app .iafwzdesk-conn-input-wrap input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    height: 54px;
    padding: 0 14px 0 44px;
    border: 1px solid #e4e6ef;
    border-radius: 12px;
    background: #fbfbfe;
    box-shadow: none;
    font-size: 16px;
    color: #1b1d2a;
}

.iafwzdesk-app .iafwzdesk-conn-input-wrap input[type="text"]:focus {
    background: #fff;
    border-color: #8b6cf8;
    box-shadow: 0 0 0 3px #ece7fe;
    outline: none;
}

/* ── Dropdown opens upward when there isn't room below ── */

.iafwzdesk-skin-combo.iafwzdesk-skin-up .iafwzdesk-skin-panel {
    top: auto;
    bottom: calc(100% + 6px);
}

/* ── Loading state (module list being fetched): spinner in place of the chevron ── */

.iafwzdesk-skin-combo.iafwzdesk-skin-loading .iafwzdesk-skin-chevron { display: none; }

.iafwzdesk-skin-combo.iafwzdesk-skin-loading .iafwzdesk-skin-btn::before {
    content: "";
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 2px solid #e3dcfc;
    border-top-color: #6a4cf0;
    animation: iafwzdesk-conn-spin .7s linear infinite;
}

.iafwzdesk-wizard-field .iafwzdesk-skin-combo.iafwzdesk-skin-loading .iafwzdesk-skin-btn { opacity: 1; }

/* ── Continue button: spinner while Step 2's fields are loading ── */

.iafwzdesk-wizard .iafwzdesk-btn-primary.iafwzdesk-loading { opacity: .85; cursor: progress; }

.iafwzdesk-wizard .iafwzdesk-btn-primary.iafwzdesk-loading::before {
    content: "";
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    animation: iafwzdesk-conn-spin .7s linear infinite;
}

/* ============================================================
 * Step 2 / Step 3 - reference-design layout
 * ============================================================ */

/* `.iafwzdesk-hidden` (display:none) must beat the display:flex set on these. */

/* Content column: 880px, centred; footer bar still spans the whole card. */

.iafwzdesk-wizard-panel[data-wizard-panel="2"] > *:not(.iafwzdesk-wizard-footer),
.iafwzdesk-wizard-panel[data-wizard-panel="3"] > *:not(.iafwzdesk-wizard-footer) {
    width: 100%;
    max-width: 880px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.iafwzdesk-wizard-panel[data-wizard-panel="2"],
.iafwzdesk-wizard-panel[data-wizard-panel="3"] { padding-top: 26px; }

/* Mapping card + table: header bar and row rhythm from the design */

.iafwzdesk-fm-card {
    border: 1px solid #eceef5;
    border-radius: 14px;
    overflow: visible;
}

.iafwzdesk-fm-table { table-layout: fixed; border-collapse: collapse; }

.iafwzdesk-fm-table thead th.iafwzdesk-setup-th {
    background: #f1edff;
    color: #6b5bb8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    padding: 10px 16px;
}

.iafwzdesk-fm-table thead th.iafwzdesk-setup-th:first-child { border-radius: 14px 0 0 0; }

.iafwzdesk-fm-table thead th.iafwzdesk-setup-th:last-child { border-radius: 0 14px 0 0; }

.iafwzdesk-fm-table thead th.iafwzdesk-setup-th-spacer { width: 106px; background: #f1edff; }

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td {
    padding: 10px 16px;
    vertical-align: middle;
}

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td:nth-child(3) { padding-left: 16px; }

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td:first-child { padding-right: 40px; }

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td:first-child::after { color: #b3b7c8; right: 12px; }

.iafwzdesk-fm-table tbody tr:not(:first-child) td.iafwzdesk-setup-td { border-top: 1px solid #f1f2f7; }

.iafwzdesk-fm-table tbody tr:not(:last-child) td.iafwzdesk-setup-td { border-bottom: none; }

.iafwzdesk-fm-table .iafwzdesk-skin-btn { height: 42px; padding: 0 12px; background: #fbfbfe; border-radius: 10px; }

.iafwzdesk-fm-table .iafwzdesk-skin-combo.iafwzdesk-skin-open .iafwzdesk-skin-btn { background: #fff; }

.iafwzdesk-fm-td-actions { justify-content: flex-end; }

/* Required (system-mandatory) Zoho field: tinted box + REQUIRED badge */

.iafwzdesk-fm-table .iafwzdesk-skin-combo.iafwzdesk-skin-locked .iafwzdesk-skin-btn {
    background: #f8f9fc;
    border: 1px solid #eceef5;
    opacity: 1;
    color: #1b1d2a;
}

.iafwzdesk-fm-table .iafwzdesk-skin-combo.iafwzdesk-skin-locked .iafwzdesk-skin-btn-label { font-weight: 600; }

.iafwzdesk-fm-table .iafwzdesk-skin-combo.iafwzdesk-skin-locked .iafwzdesk-skin-lock { display: none; }

.iafwzdesk-skin-badge {
    font-size: 10px;
    letter-spacing: .03em;
    color: #d23339;
    background: #fdecec;
    border-radius: 5px;
    padding: 3px 7px;
}

/* Add additional details card */

/* Footer inside Step 2/3 sits flush at the card's bottom like Step 1 */

.iafwzdesk-wizard-panel[data-wizard-panel="2"] .iafwzdesk-wizard-footer,
.iafwzdesk-wizard-panel[data-wizard-panel="3"] .iafwzdesk-wizard-footer { max-width: none; }

/* Toggle switch: 46x26 pill with a 20px knob (reference design) */

/* ── Field mapping: "Custom value" editor (textarea + Insert form field) ── */

.iafwzdesk-fm-table .iafwzdesk-setup-fm-custom-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.iafwzdesk-fm-table textarea.iafwzdesk-setup-fm-custom-input {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 84px !important;
    box-sizing: border-box;
    padding: 10px 12px !important;
    border: 1px solid #e4e6ef !important;
    border-radius: 10px !important;
    background: #fff;
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.5;
    color: #1b1d2a !important;
    resize: vertical;
    box-shadow: none;
}

.iafwzdesk-fm-table textarea.iafwzdesk-setup-fm-custom-input:focus {
    outline: none;
    border-color: #8b6cf8 !important;
    box-shadow: 0 0 0 3px #ece7fe;
}

/* ============================================================
 * Field-mapping rows as a CSS grid (reference design): form field | -> | zoho
 * field | actions, with the "Custom value" editor on its own full-width line
 * under the row. The cells stay real <td>s (the JS reads/writes them as
 * before); the first cell uses display:contents so its dropdown, the arrow
 * and the custom editor can sit in different grid tracks.
 * ============================================================ */

.iafwzdesk-fm-table,
.iafwzdesk-fm-table thead,
.iafwzdesk-fm-table tbody { display: block; width: 100%; }

.iafwzdesk-fm-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 106px;
    column-gap: 10px;
    row-gap: 10px;
    align-items: center;
    padding: 10px 16px;
}

.iafwzdesk-fm-table tbody tr + tr { border-top: 1px solid #f1f2f7; }

/* header bar */

.iafwzdesk-fm-table thead tr { background: #f1edff; border-radius: 14px 14px 0 0; }

.iafwzdesk-fm-table thead th.iafwzdesk-setup-th,
.iafwzdesk-fm-table thead th.iafwzdesk-setup-th-spacer {
    background: transparent;
    padding: 0;
    width: auto;
    border-radius: 0;
}

.iafwzdesk-fm-table thead th:nth-child(1) { grid-column: 1; }

.iafwzdesk-fm-table thead th:nth-child(2) { grid-column: 3; }

.iafwzdesk-fm-table thead th:nth-child(3) { grid-column: 4; }

/* cells */

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td,
.iafwzdesk-fm-table tbody tr:not(:last-child) td.iafwzdesk-setup-td,
.iafwzdesk-fm-table tbody tr:not(:first-child) td.iafwzdesk-setup-td {
    padding: 0;
    border: none;
    min-width: 0;
}

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td:first-child { display: contents; padding: 0; }

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td:nth-child(2) { grid-column: 3; grid-row: 1; }

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td:nth-child(3) { grid-column: 4; grid-row: 1; padding: 0; }

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td:first-child > .iafwzdesk-skin-combo { grid-column: 1; grid-row: 1; min-width: 0; }

/* The two boxes share the row's top line; the arrow is a box of the same height (the select height) on that line, so it sits
   in the middle between them whatever else makes the row taller (icons, hints, a custom-value box on the line below). */
.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td:first-child > .iafwzdesk-skin-combo,
.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td:nth-child(2) { align-self: start; }

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td:first-child::after {
    position: static;
    transform: none;
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    justify-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    line-height: 1;
    color: #b3b7c8;
    font-size: 15px;
}

.iafwzdesk-fm-table tbody td.iafwzdesk-setup-td:first-child > .iafwzdesk-setup-fm-custom-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 0;
}

.iafwzdesk-fm-table .iafwzdesk-fm-td-actions { justify-content: flex-end; align-items: center; }

/* "+ Add field": a small button centred under the arrow, i.e. on the centre line of the two fields. It spans the same columns as
   the rows' two fields and the arrow: the row's side padding (16px) on the left, and on the right the row's side padding, the
   icons column (106px) and the column gap (10px). */
.iafwzdesk-fm-addrow {
    display: flex;
    justify-content: center;
    padding: 14px 132px 16px 16px;
    border-top: 1px solid #f1f2f7;
}

.iafwzdesk-fm-add-field {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    height: 34px;
    padding: 0 16px;
    font-size: 13px;
}

/* The Notes box must show: setup-fm.css still hides the old `#iafwzdesk-setup-note` (display:none). */

/* ── Additional details: no prefix icons; Attachments as one-field-per-row with + / - ── */

/* A file field already picked in another row. */

.iafwzdesk-skin-option.is-disabled,
.iafwzdesk-skin-option:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* A Pro-locked option: only the name is dimmed, the PRO badge stays fully visible. */

.iafwzdesk-skin-option.has-pro.is-disabled,
.iafwzdesk-skin-option.has-pro:disabled {
    opacity: 1;
}

.iafwzdesk-skin-option.has-pro:disabled .iafwzdesk-skin-option-text,
.iafwzdesk-skin-option.has-pro.is-disabled .iafwzdesk-skin-option-text {
    opacity: .45;
}

/* Attachments: compact rows instead of full width. */

/* Tags: the inner text box gets WordPress's blue focus ring/outline; the outer box already shows
   the purple focus ring (:focus-within), so switch the inner one off. */

/* "{} Insert form field": one floating searchable list (same style as the field dropdowns). */

.iafwzdesk-skin-panel.iafwzdesk-insert-panel {
    position: fixed;
    right: auto;
    z-index: 100002;
    box-sizing: border-box;
    max-height: none;
}

.iafwzdesk-insert-panel .iafwzdesk-skin-list {
    max-height: 240px;
}

/* Step 1: small "fill in all fields" note beside Continue while it is disabled. */

.iafwzdesk-wizard-continue-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.iafwzdesk-wizard-continue-hint {
    font-size: 12px;
    color: var(--iafwzdesk-muted-text, #8a8fa6);
}

.iafwzdesk-wizard-continue-hint[hidden] { display: none; }

/* "Add connection" modal while it sends the user to Zoho: buttons blocked, spinner on Continue. */

/* Edit screen "Add connection": the other Zoho product is locked (same as the Connections page). */

/* Step 1 Continue while the mapping fields are still loading: spinner, blocked cursor. */

.iafwzdesk-wizard #iafwzdesk-wizard-continue-1.iafwzdesk-loading,
.iafwzdesk-wizard #iafwzdesk-wizard-continue-1.iafwzdesk-loading:disabled {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: not-allowed;
    opacity: .85;
}

/* Tags: one text field per row with "+" / "-" at the end (same layout as Attachments). */

/* Tags: the "{}" insert-field button sits between the text field and "+" / "-". */

/* The hint can be a full sentence now (which area is not filled): let it wrap beside the button. */

.iafwzdesk-wizard-continue-hint { max-width: 480px; text-align: right; line-height: 1.4; }

/* Step 3: Test run button next to Save; blocked cursor while Save is running. */

.iafwzdesk-wizard-continue-wrap .iafwzdesk-btn-secondary:disabled,
.iafwzdesk-wizard-footer .iafwzdesk-btn-secondary:disabled { opacity: .55; cursor: not-allowed; }

.iafwzdesk-wizard #iafwzdesk-setup-save-btn.iafwzdesk-loading,
.iafwzdesk-wizard #iafwzdesk-setup-save-btn.iafwzdesk-loading:disabled {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: not-allowed;
    opacity: .85;
}

/* Test run popup (built in iafwzdesk-wizard-extra.js, reuses the Add connection popup frame).
   Header and footer stay put; only the field list scrolls (thin scrollbar). */

/* Edit screen, Step 1: why Zoho could not be read (e.g. the connection needs reconnecting), next to the connection. */

.iafwzdesk-conn-issue {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    border: 1px solid #f7cfd0;
    border-radius: 10px;
    background: #fff5f5;
    color: #b3262b;
    font-size: 13px;
    line-height: 1.5;
}

.iafwzdesk-conn-issue svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Picklist field: the "allowed values" info icon sits next to the Zoho dropdown, in the gap between it and
   the + / - buttons (about 8px each side), so the dropdown keeps the same size and position as in the
   other rows (it used to push the dropdown down). */

/* ── Additions for the Zoho Desk wizard ── */
.iafwzdesk-wizard-panel-title {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 800;
    color: var(--iafwzdesk-ink, #1b1d2a);
    text-align: center;
}

.iafwzdesk-wizard-panel-title:focus {
    outline: none;
}

.iafwzdesk-addl-details-spacer {
    flex: 1;
}

.iafwzdesk-filters-card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--iafwzdesk-ink, #1b1d2a);
}

.iafwzdesk-wizard-step[tabindex="0"] {
    cursor: pointer;
}

.iafwzdesk-wizard-step:focus-visible {
    outline: 2px solid var(--iafwzdesk-primary-grad-start, #8b6cf8);
    outline-offset: 3px;
    border-radius: var(--iafwzdesk-radius-sm, 8px);
}

/* A field that is missing (name or a custom value). */
.iafwzdesk-input-error,
.iafwzdesk-app .iafwzdesk-input.iafwzdesk-input-error,
.iafwzdesk-app textarea.iafwzdesk-input-error {
    border-color: #e0393e !important;
    box-shadow: 0 0 0 3px rgba(224, 57, 62, .12) !important;
}

/* A mapping row that still uses a premium field on a Free site: amber, with a PRO tag; Save stays off until it is gone. */
.iafwzdesk-fm-row-locked > td {
    background: #fff8ec;
}

.iafwzdesk-fm-row-locked .iafwzdesk-skin-btn {
    border-color: #f1c27d;
}

.iafwzdesk-fm-td-actions .iafwzdesk-pro-badge {
    margin-right: 6px;
}

.iafwzdesk-save-hint a {
    font-weight: 700;
    color: var(--iafwzdesk-primary-text, #5b3fe0);
}

/* "Allowed values" info icon next to a Desk field dropdown. */
.iafwzdesk-allowed-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    vertical-align: middle;
}

.iafwzdesk-allowed-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--iafwzdesk-primary-text, #6a4cf0);
    cursor: pointer;
}

.iafwzdesk-allowed-icon:hover,
.iafwzdesk-allowed-icon:focus-visible {
    color: var(--iafwzdesk-primary-text, #5b3fe0);
    background: var(--iafwzdesk-lavender-100, #ebe5ff);
}

.iafwzdesk-allowed-popup {
    position: fixed;
    z-index: 100001;
    width: 300px;
    max-width: calc(100vw - 16px);
    padding: 14px 12px 12px;
    background: #fff;
    border: 1px solid var(--iafwzdesk-border-100, #eceef5);
    border-radius: 12px;
    box-shadow: 0 18px 40px -12px rgba(30, 30, 70, .35);
}

/* The little arrow that points at the icon. */
.iafwzdesk-allowed-popup::before {
    content: "";
    position: absolute;
    top: -6px;
    left: var(--iafwzdesk-arrow-left, 50%);
    width: 10px;
    height: 10px;
    margin-left: -5px;
    background: #fff;
    border-top: 1px solid var(--iafwzdesk-border-100, #eceef5);
    border-left: 1px solid var(--iafwzdesk-border-100, #eceef5);
    transform: rotate(45deg);
}

.iafwzdesk-allowed-popup.is-up::before {
    top: auto;
    bottom: -6px;
    transform: rotate(225deg);
}

.iafwzdesk-allowed-popup[hidden] {
    display: none;
}

.iafwzdesk-allowed-title {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--iafwzdesk-ink, #1b1d2a);
}

.iafwzdesk-allowed-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 190px;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
}

.iafwzdesk-allowed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dbe9fb;
    border-radius: 8px;
    background: #f1f8ff;
    text-align: left;
    font-size: 14px;
    color: var(--iafwzdesk-ink, #1b1d2a);
    cursor: pointer;
}

.iafwzdesk-allowed-item:hover,
.iafwzdesk-allowed-item:focus-visible {
    background: #d7ebff;
    outline: none;
}

.iafwzdesk-allowed-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.iafwzdesk-allowed-copy {
    display: inline-flex;
    flex: 0 0 auto;
    color: #c4572c;
}

/* The filter switch: the builder is hidden while it is off. */
.iafwzdesk-setup-filter-clear-all:focus-visible {
    outline: 2px solid var(--iafwzdesk-primary-grad-start, #8b6cf8);
    outline-offset: 2px;
}

/* The wizard fills the width of the page, like the other tabs. */
.iafwzdesk-wizard {
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 782px) {
    .iafwzdesk-wizard-stepper {
        justify-content: flex-start;
        gap: 10px;
        padding: 16px;
    }

    .iafwzdesk-wizard-step-line {
        display: none;
    }

    .iafwzdesk-wizard-panel {
        padding: 20px 14px;
    }
}

@media (max-width: 480px) {
    .iafwzdesk-wizard-step-text {
        display: none;
    }

    .iafwzdesk-wizard-step-active .iafwzdesk-wizard-step-text {
        display: flex;
    }
}

/* "{} Insert form field" button under a custom value (opens the floating list above). */
.iafwzdesk-insert-field-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--iafwzdesk-lavender-border-100, #d9cffb);
    border-radius: 8px;
    background: var(--iafwzdesk-lavender-300, #faf8ff);
    color: var(--iafwzdesk-primary-text, #5b3fe0);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
}

.iafwzdesk-insert-field-btn:hover,
.iafwzdesk-insert-field-btn-open {
    background: var(--iafwzdesk-lavender-200, #f1edff);
}

.iafwzdesk-custom-insert {
    position: relative;
    align-self: flex-start;
    margin-top: 6px;
}

.iafwzdesk-custom-insert .iafwzdesk-insert-field-btn {
    height: 30px;
}

/* Step 3: Test run button next to Save; blocked cursor while Save is running. */
.iafwzdesk-wizard-continue-wrap .iafwzdesk-btn-secondary:disabled,
.iafwzdesk-wizard-footer .iafwzdesk-btn-secondary:disabled { opacity: .55; cursor: not-allowed; }
.iafwzdesk-wizard #iafwzdesk-setup-save-btn.iafwzdesk-loading,
.iafwzdesk-wizard #iafwzdesk-setup-save-btn.iafwzdesk-loading:disabled {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: not-allowed;
    opacity: .85;
}

/* Test run popup (built in iafwzdesk-testrun.js, reuses the Add connection popup frame).
   Header and footer stay put; only the field list scrolls (thin scrollbar). */
#iafwzdesk-testrun-modal .iafwzdesk-testrun-box { max-width: 640px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; }
#iafwzdesk-testrun-modal .iafwzdesk-conn-modal-head { flex: 0 0 auto; padding: 16px 22px 14px; }
#iafwzdesk-testrun-modal .iafwzdesk-conn-modal-head h3 { margin: 0; font-size: 17px; }
#iafwzdesk-testrun-modal .iafwzdesk-conn-modal-foot { flex: 0 0 auto; padding: 12px 22px; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    gap: 12px;
    padding: 16px 22px;
    scrollbar-width: thin;
    scrollbar-color: #d4d6e2 transparent;
}
#iafwzdesk-testrun-modal .iafwzdesk-testrun-body::-webkit-scrollbar { width: 6px; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-body::-webkit-scrollbar-track { background: transparent; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-body::-webkit-scrollbar-thumb { background: #d4d6e2; border-radius: 999px; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-intro { margin: 0; font-size: 12.5px; line-height: 1.5; color: #6b7085; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-grid { display: flex; flex-direction: column; gap: 12px; }
#iafwzdesk-testrun-modal .iafwzdesk-conn-field { gap: 5px; min-width: 0; }
#iafwzdesk-testrun-modal .iafwzdesk-conn-label { font-size: 13px; flex-wrap: wrap; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-input {
    width: 100%;
    height: 38px;
    margin: 0;
    padding: 0 12px;
    box-sizing: border-box;
    border: 1px solid #e4e6ef;
    border-radius: 10px;
    background: #fbfbfe;
    box-shadow: none;
    font-family: inherit;
    font-size: 13px;
    color: #1b1d2a;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
#iafwzdesk-testrun-modal .iafwzdesk-testrun-input::placeholder { color: #a3a7bd; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-input:focus { background: #fff; border-color: #8b6cf8; box-shadow: 0 0 0 3px #ece7fe; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-input.is-invalid { border-color: #e5484d; background: #fff8f8; box-shadow: 0 0 0 3px #fdecec; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-input:disabled { background: #f3f4f8; color: #8a8fa6; cursor: not-allowed; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-req { margin-left: 2px; padding: 1px 7px; border-radius: 999px; background: #fdecec; color: #c0282d; font-size: 10.5px; font-weight: 600; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-hint { font-size: 11.5px; line-height: 1.35; color: #8a8fa6; word-break: break-word; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-result { padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; word-break: break-word; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-result[hidden] { display: none; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-result.is-ok { background: #e7f7ee; color: #138a4b; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-result.is-error { background: #fdecec; color: #c0282d; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-result-text { font-weight: 600; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-toggle { margin-top: 4px; padding: 0; border: 0; background: none; color: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-toggle[hidden],
#iafwzdesk-testrun-modal .iafwzdesk-testrun-detail[hidden] { display: none; }
#iafwzdesk-testrun-modal .iafwzdesk-testrun-detail { margin: 8px 0 0; padding: 10px; max-height: 200px; overflow: auto; border-radius: 8px; background: rgba(255, 255, 255, .7); color: #2b2f42; font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; scrollbar-width: thin; }
#iafwzdesk-testrun-modal .iafwzdesk-btn-primary,
#iafwzdesk-testrun-modal .iafwzdesk-btn-secondary { padding-top: 9px; padding-bottom: 9px; }
#iafwzdesk-testrun-modal button:disabled { cursor: not-allowed; }
#iafwzdesk-testrun-modal .iafwzdesk-btn-secondary:disabled,
#iafwzdesk-testrun-modal .iafwzdesk-conn-modal-close:disabled { opacity: .55; }
#iafwzdesk-testrun-modal .iafwzdesk-btn-primary.iafwzdesk-loading,
#iafwzdesk-testrun-modal .iafwzdesk-btn-primary.iafwzdesk-loading:disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: .85;
    cursor: not-allowed;
}
#iafwzdesk-testrun-modal .iafwzdesk-btn-primary.iafwzdesk-loading::before {
    content: "";
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    animation: iafwzdesk-confirm-spin .7s linear infinite;
}

/* ── Step 2: Additional details (Attachment, Status, Channel) ── */
.iafwzdesk-addl-details {
    margin-top: 16px;
    background: var(--iafwzdesk-card-bg, #fff);
    border: 1px solid var(--iafwzdesk-border-100, #eceef5);
    border-radius: 16px;
    overflow: visible;
}

.iafwzdesk-addl-details-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 18px;
}

.iafwzdesk-addl-details-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--iafwzdesk-ink, #1b1d2a);
}

.iafwzdesk-addl-details-header .iafwzdesk-pro-badge {
    display: none; /* shown only while the section's switch is on */
    margin-left: 10px;
    padding: 3px 10px;
    font-size: 10.5px;
    letter-spacing: .4px;
}

.iafwzdesk-addl-details-header:has(#iafwzdesk-setup-addl-toggle:checked) .iafwzdesk-pro-badge {
    display: inline-flex;
}

.iafwzdesk-addl-details-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 18px;
    border-top: 1px solid #f1f2f7;
}

.iafwzdesk-addl-details-body.iafwzdesk-hidden {
    display: none;
}

.iafwzdesk-addl-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.iafwzdesk-addl-row[hidden] {
    display: none;
}

.iafwzdesk-addl-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.iafwzdesk-addl-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--iafwzdesk-ink, #1b1d2a);
}

/* Toggle switch: 46x26 pill with a 20px knob (same as the Filters card) */
.iafwzdesk-addl-details-header .iafwzdesk-setup-toggle-switch { width: 46px; height: 26px; flex-shrink: 0; }
.iafwzdesk-addl-details-header .iafwzdesk-setup-toggle-slider { background-color: #d4d6e2; border-radius: 999px; }
.iafwzdesk-addl-details-header .iafwzdesk-setup-toggle-slider:before {
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: transform .18s;
}
.iafwzdesk-addl-details-header .iafwzdesk-setup-toggle-input:checked + .iafwzdesk-setup-toggle-slider:before { transform: translateX(20px); }

/* Attachment: one file field per row with + / - */
.iafwzdesk-attach-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
}

.iafwzdesk-attach-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.iafwzdesk-attach-row .iafwzdesk-attach-combo {
    position: relative;
    flex: 1;
    min-width: 0;
}

.iafwzdesk-multi-combo .iafwzdesk-skin-chevron {
    display: flex;
}

.iafwzdesk-multi-combo.iafwzdesk-skin-open .iafwzdesk-skin-btn {
    background: #fff;
    border-color: var(--iafwzdesk-lavender-border-300, #c9bdfb);
}

.iafwzdesk-skin-option.is-disabled,
.iafwzdesk-skin-option:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.iafwzdesk-attach-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--iafwzdesk-border-200, #e4e6ef);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.iafwzdesk-attach-btn-plus {
    color: var(--iafwzdesk-primary-grad-end, #6a4cf0);
    border-color: var(--iafwzdesk-lavender-border-100, #d9cffb);
    background: var(--iafwzdesk-lavender-300, #faf8ff);
}

.iafwzdesk-attach-btn-minus {
    color: var(--iafwzdesk-error, #e0393e);
}

.iafwzdesk-attach-btn-plus:hover:not(:disabled) {
    background: #ebe5ff;
    border-color: #c9bdfb;
}

.iafwzdesk-attach-btn-minus:hover:not(:disabled) {
    background: var(--iafwzdesk-error-bg, #fdecec);
    border-color: #f6c9cb;
}

.iafwzdesk-attach-btn:focus {
    outline: none;
    box-shadow: none;
}

.iafwzdesk-attach-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(106, 76, 240, .3);
}

.iafwzdesk-attach-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* Status / Channel: a form field dropdown (or a custom value) with "-" to clear it */
.iafwzdesk-addl-fm {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 460px;
}

.iafwzdesk-addl-fm-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.iafwzdesk-addl-fm .iafwzdesk-setup-fm-custom-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.iafwzdesk-addl-fm textarea.iafwzdesk-setup-fm-custom-input {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 84px !important;
    box-sizing: border-box;
    padding: 10px 12px !important;
    border: 1px solid #e4e6ef !important;
    border-radius: 10px !important;
    background: #fff;
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.5;
    color: #1b1d2a !important;
    resize: vertical;
    box-shadow: none;
}

.iafwzdesk-addl-fm textarea.iafwzdesk-setup-fm-custom-input:focus {
    outline: none;
    border-color: #8b6cf8 !important;
    box-shadow: 0 0 0 3px #ece7fe;
}

/* Without a premium licence the items are shown but locked; only "-" works, so a saved value can be removed. */
.iafwzdesk-addl-col-locked .iafwzdesk-skin-combo,
.iafwzdesk-addl-col-locked .iafwzdesk-attach-combo,
.iafwzdesk-addl-col-locked .iafwzdesk-attach-btn-plus,
.iafwzdesk-addl-col-locked .iafwzdesk-setup-fm-custom-wrap {
    opacity: .55;
    cursor: not-allowed;
}

.iafwzdesk-addl-col-locked .iafwzdesk-skin-combo *,
.iafwzdesk-addl-col-locked .iafwzdesk-attach-combo *,
.iafwzdesk-addl-col-locked .iafwzdesk-setup-fm-custom-wrap * {
    pointer-events: none;
}

/* Status / Channel: one text box with "{}" (insert form field) and the allowed-values info icon. */
.iafwzdesk-addl-fm-row { display: flex; align-items: center; gap: 8px; }
.iafwzdesk-addl-fm-row .iafwzdesk-addl-fm-input { flex: 1; min-width: 0; }
.iafwzdesk-addl-fm-row .iafwzdesk-allowed-wrap { position: relative; }
.iafwzdesk-addl-fm-row .iafwzdesk-addl-insert-btn { align-self: center; flex: 0 0 auto; }

/* Mapping row: the info icon sits just past the Desk dropdown's right edge, on the dropdown's line. */
.iafwzdesk-fm-table .iafwzdesk-skin-combo > .iafwzdesk-allowed-wrap {
    position: absolute;
    top: calc(50% - 14px); /* the icon is 28px high; no transform here, it would anchor the fixed popup to the icon */
    left: calc(100% + 8px);
    margin: 0;
    z-index: 2;
}

/* The row that was just copied: green tick and "Copied" for a moment. */
.iafwzdesk-allowed-item.is-copied { background: #e7f7ee; border-color: #b9e6cc; }
.iafwzdesk-allowed-item.is-copied .iafwzdesk-allowed-copy { color: #0f9f6e; gap: 5px; align-items: center; font-size: 12px; font-weight: 700; }

/* Status / Channel: refresh button and the "⋯" Static / Custom popup. */
.iafwzdesk-addl-fm-row [hidden] { display: none !important; }
.iafwzdesk-addl-fm-row .iafwzdesk-addl-fm-select { flex: 1; min-width: 0; }
.iafwzdesk-addl-refresh-btn,
.iafwzdesk-mode-btn {
    display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
    height: 42px; padding: 0; border: 1px solid #e4e6f0; border-radius: var(--iafwzdesk-radius-sm);
    background: #fbfbfe; color: var(--iafwzdesk-muted-text); cursor: pointer; box-shadow: none;
}
.iafwzdesk-addl-refresh-btn { width: 36px; }
.iafwzdesk-mode-btn { width: 24px; }
.iafwzdesk-addl-refresh-btn:hover:not(:disabled),
.iafwzdesk-mode-btn:hover:not(:disabled) { color: var(--iafwzdesk-primary-text); border-color: var(--iafwzdesk-primary-text); }
.iafwzdesk-addl-refresh-btn:disabled,
.iafwzdesk-mode-btn:disabled { opacity: .5; cursor: not-allowed; }
.iafwzdesk-addl-refresh-btn.is-loading svg { animation: iafwzdesk-addl-spin .8s linear infinite; }
@keyframes iafwzdesk-addl-spin { to { transform: rotate(360deg); } }
.iafwzdesk-mode-btn-wrap { position: relative; flex: 0 0 auto; }
.iafwzdesk-mode-popover {
    position: absolute; top: calc(100% + 4px); right: 0; z-index: 120; min-width: 180px; padding: 4px 0;
    background: var(--iafwzdesk-card-bg); border: 1px solid #e4e6f0;
    border-radius: var(--iafwzdesk-radius-sm); box-shadow: var(--iafwzdesk-shadow-menu);
}
.iafwzdesk-mode-popover[hidden] { display: none; }
.iafwzdesk-mode-option { padding: 8px 14px 6px; cursor: pointer; }
.iafwzdesk-mode-option:hover { background: var(--iafwzdesk-page-bg); }
.iafwzdesk-mode-opt-row { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.iafwzdesk-mode-check { width: 14px; flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--iafwzdesk-primary-text); }
.iafwzdesk-mode-label { font-size: 13px; font-weight: 600; color: var(--iafwzdesk-ink); }
.iafwzdesk-mode-option.is-active .iafwzdesk-mode-label { color: var(--iafwzdesk-primary-text); }
.iafwzdesk-mode-desc { display: block; padding-left: 20px; font-size: 11px; color: var(--iafwzdesk-muted-text); }

.iafwzdesk-addl-fm-select-wrap { flex: 1; min-width: 0; position: relative; }
.iafwzdesk-addl-fm-select-wrap .iafwzdesk-skin-btn { width: 100%; }

/* Keyboard: focus ring on the "⋯" button and on the Static / Custom entries (arrows move, Escape closes). */
.iafwzdesk-mode-btn:focus-visible { outline: 2px solid var(--iafwzdesk-primary-text); outline-offset: 2px; }
.iafwzdesk-mode-option:focus-visible { outline: none; background: var(--iafwzdesk-page-bg); box-shadow: inset 2px 0 0 var(--iafwzdesk-primary-text); }
