/* Settings tab: Connections / Notifications / General / License sub-tabs. */

.integrazo_fwcrm_form-settings-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--integrazo_fwcrm_form-border-100, #eceef5);
    margin-bottom: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.integrazo_fwcrm_form-settings-tabs::-webkit-scrollbar {
    display: none;
}

.integrazo_fwcrm_form-settings-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 4px;
    margin-right: 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--integrazo_fwcrm_form-muted-text, #8a8fa6);
    cursor: pointer;
}

.integrazo_fwcrm_form-settings-tab:hover {
    color: var(--integrazo_fwcrm_form-body-text, #4a4f66);
}

.integrazo_fwcrm_form-settings-tab[aria-selected="true"] {
    color: var(--integrazo_fwcrm_form-primary-text, #5b3fe0);
    border-bottom-color: var(--integrazo_fwcrm_form-primary-grad-end, #6a4cf0);
}

.integrazo_fwcrm_form-settings-section {
    display: none;
}

.integrazo_fwcrm_form-settings-section-active {
    display: block;
}

.integrazo_fwcrm_form-settings-group {
    display: none;
}

.integrazo_fwcrm_form-settings-group-active {
    display: block;
}

/* ── Notifications / General: one card per setting ── */
.integrazo_fwcrm_form-settings-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 820px;
    box-sizing: border-box;
    padding: 22px;
    /* One shared white panel with an outer border for General and Notifications. */
    background: var(--integrazo_fwcrm_form-card-bg, #fff);
    border: 1px solid var(--integrazo_fwcrm_form-border-100, #eceef5);
    border-radius: var(--integrazo_fwcrm_form-radius-md, 14px);
    box-shadow: var(--integrazo_fwcrm_form-shadow-card, 0 4px 16px rgba(20, 22, 50, .04));
}

.integrazo_fwcrm_form-settings-group-active {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.integrazo_fwcrm_form-setting-card {
    background: var(--integrazo_fwcrm_form-card-bg, #fff);
    border: 1px solid var(--integrazo_fwcrm_form-border-100, #eceef5);
    border-radius: 14px;
}

.integrazo_fwcrm_form-setting-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px;
}

.integrazo_fwcrm_form-setting-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.integrazo_fwcrm_form-setting-icon--error {
    background: var(--integrazo_fwcrm_form-error-bg, #fdecec);
    color: var(--integrazo_fwcrm_form-error, #e0393e);
}

.integrazo_fwcrm_form-setting-icon--warn {
    background: #fef4e2;
    color: #f59e0b;
}

.integrazo_fwcrm_form-setting-icon--neutral {
    background: #f1f2f6;
    color: #6b7085;
}

.integrazo_fwcrm_form-setting-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.integrazo_fwcrm_form-setting-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--integrazo_fwcrm_form-ink, #1b1d2a);
    cursor: pointer;
}

.integrazo_fwcrm_form-setting-desc {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--integrazo_fwcrm_form-muted-text, #8a8fa6);
}

.integrazo_fwcrm_form-setting-warning {
    align-self: flex-start;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #fff4ec;
    color: #c2410c;
    font-size: 12.5px;
    font-weight: 600;
}

.integrazo_fwcrm_form-setting-warning[hidden],
.integrazo_fwcrm_form-setting-panel[hidden] {
    display: none;
}

/* Expanded options of a setting that is switched on. */
.integrazo_fwcrm_form-setting-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 20px 24px 24px 80px;
    border-top: 1px solid var(--integrazo_fwcrm_form-border-300, #f1f2f7);
}

.integrazo_fwcrm_form-setting-panel--two {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.integrazo_fwcrm_form-setting-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.integrazo_fwcrm_form-setting-field--narrow {
    max-width: 420px;
}

.integrazo_fwcrm_form-setting-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--integrazo_fwcrm_form-ink, #1b1d2a);
}

#wpcontent .integrazo_fwcrm_form-setting-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--integrazo_fwcrm_form-border-200, #e4e6ef);
    border-radius: 12px;
    background: #f8f9fc;
    box-shadow: none;
    font-size: 14px;
    color: var(--integrazo_fwcrm_form-ink, #1b1d2a);
}

#wpcontent .integrazo_fwcrm_form-setting-input:focus {
    border-color: var(--integrazo_fwcrm_form-primary-grad-start, #8b6cf8);
    box-shadow: 0 0 0 3px #ece7fe;
    background: #fff;
    outline: none;
}

/* On / off switch: a real checkbox underneath, so the form and the keyboard work as before. */
.integrazo_fwcrm_form-switch {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    width: 46px;
    height: 26px;
}

#wpcontent .integrazo_fwcrm_form-switch-input {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.integrazo_fwcrm_form-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d9dce6;
    transition: background-color .18s ease;
}

.integrazo_fwcrm_form-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: left .18s ease;
}

.integrazo_fwcrm_form-switch-input:checked + .integrazo_fwcrm_form-switch-track {
    background: linear-gradient(135deg, var(--integrazo_fwcrm_form-primary-grad-start, #8b6cf8), var(--integrazo_fwcrm_form-primary-grad-end, #6a4cf0));
}

.integrazo_fwcrm_form-switch-input:checked + .integrazo_fwcrm_form-switch-track::after {
    left: 23px;
}

.integrazo_fwcrm_form-switch-input:focus-visible + .integrazo_fwcrm_form-switch-track {
    outline: 2px solid var(--integrazo_fwcrm_form-primary-grad-end, #6a4cf0);
    outline-offset: 2px;
}

.integrazo_fwcrm_form-setting-actions {
    display: flex;
    justify-content: flex-end;
}

#wpcontent .integrazo_fwcrm_form-settings-save {
    height: 44px;
    padding: 0 22px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--integrazo_fwcrm_form-primary-grad-start, #8b6cf8), var(--integrazo_fwcrm_form-primary-grad-end, #6a4cf0));
    font-size: 14.5px;
    box-shadow: 0 10px 24px -10px rgba(106, 76, 240, .6);
}

#wpcontent .integrazo_fwcrm_form-settings-save:disabled {
    opacity: .6;
    cursor: not-allowed;
}

@media (max-width: 782px) {
    .integrazo_fwcrm_form-setting-head {
        padding: 18px 16px;
    }

    .integrazo_fwcrm_form-setting-panel {
        padding: 16px;
    }
}

/* ── Connections hint / empty guidance ── */
.integrazo_fwcrm_form-connections-hint {
    background: var(--integrazo_fwcrm_form-lavender-300, #f5f2ff);
    border: 1px solid var(--integrazo_fwcrm_form-lavender-border-100, #d9cffb);
    border-radius: var(--integrazo_fwcrm_form-radius-sm, 8px);
    padding: 12px 16px;
    margin-bottom: 16px;
    color: var(--integrazo_fwcrm_form-body-text, #4a4f66);
    font-size: 13.5px;
}

.integrazo_fwcrm_form-connections-hint p {
    margin: 0;
}

/* ── Service badges ── */
.integrazo_fwcrm_form-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--integrazo_fwcrm_form-radius-pill, 999px);
    font-size: 12px;
    font-weight: 700;
    background: var(--integrazo_fwcrm_form-border-300, #f1f2f7);
    color: var(--integrazo_fwcrm_form-body-text, #4a4f66);
}

.integrazo_fwcrm_form-badge.integrazo_fwcrm_form-conn-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11.5px;
}

/* Connections table: status pill and the Test connection spinner. */
.integrazo_fwcrm_form-conn-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 8px;
    border-radius: var(--integrazo_fwcrm_form-radius-pill, 999px);
    background: var(--integrazo_fwcrm_form-success-bg, #e8f8f1);
    color: var(--integrazo_fwcrm_form-success-dark, #0f9f6e);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.integrazo_fwcrm_form-conn-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--integrazo_fwcrm_form-success, #10b981);
}

.integrazo_fwcrm_form-conn-status.is-error {
    background: var(--integrazo_fwcrm_form-error-bg, #fdecec);
    color: var(--integrazo_fwcrm_form-error-dark, #d23339);
}

.integrazo_fwcrm_form-conn-status.is-error .integrazo_fwcrm_form-conn-status-dot {
    background: var(--integrazo_fwcrm_form-error, #e0393e);
}

.integrazo_fwcrm_form-row-menu-spinner {
    width: 14px;
    height: 14px;
    margin-left: auto;
    border: 2px solid var(--integrazo_fwcrm_form-lavender-border-200, #e3dcfc);
    border-top-color: var(--integrazo_fwcrm_form-primary-text, #5b3fe0);
    border-radius: 50%;
    animation: integrazo_fwcrm_form-spin .7s linear infinite;
}

.integrazo_fwcrm_form-row-menu-spinner[hidden] {
    display: none;
}

.integrazo_fwcrm_form-badge-crm {
    background: var(--integrazo_fwcrm_form-crm-bg, #efeafe);
    color: var(--integrazo_fwcrm_form-crm-text, #6a4cf0);
}

.integrazo_fwcrm_form-badge-zoho {
    background: var(--integrazo_fwcrm_form-crm-bg, #efeafe);
    color: var(--integrazo_fwcrm_form-crm-text, #6a4cf0);
}

.integrazo_fwcrm_form-badge-bigin {
    background: var(--integrazo_fwcrm_form-bigin-bg, #e8f0fe);
    color: var(--integrazo_fwcrm_form-bigin-text, #2f6fdf);
}

/* ── Notification fields: hint, invalid state, Save button loading ── */
.integrazo_fwcrm_form-setting-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #7a7f99;
}

.integrazo_fwcrm_form-setting-input.integrazo_fwcrm_form-setting-input--invalid,
#wpcontent .integrazo_fwcrm_form-setting-input.integrazo_fwcrm_form-setting-input--invalid {
    border-color: #e5484d;
    box-shadow: 0 0 0 3px rgba(229, 72, 77, .15);
}

#wpcontent .integrazo_fwcrm_form-settings-save.integrazo_fwcrm_form-loading,
#wpcontent .integrazo_fwcrm_form-settings-save.integrazo_fwcrm_form-loading:disabled {
    opacity: .85;
    cursor: not-allowed;
}

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

@keyframes integrazo_fwcrm_form-save-spin {
    to { transform: rotate(360deg); }
}

/* ── License tab (same panel / card / field look as General and Notifications) ── */
.integrazo_fwcrm_form-license-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 40px;
    padding: 16px 24px 16px 80px;
    border-top: 1px solid var(--integrazo_fwcrm_form-border-300, #f1f2f7);
}

.integrazo_fwcrm_form-license-fact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.integrazo_fwcrm_form-license-value {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 12px;
    border-radius: 999px;
    background: #ede9fe;
    color: var(--integrazo_fwcrm_form-primary-grad-end, #6a4cf0);
    font-size: 13.5px;
    font-weight: 700;
}

.integrazo_fwcrm_form-license-form .integrazo_fwcrm_form-setting-desc a {
    color: var(--integrazo_fwcrm_form-primary-grad-end, #6a4cf0);
    font-weight: 600;
    text-decoration: none;
}

.integrazo_fwcrm_form-license-form .integrazo_fwcrm_form-setting-desc a:hover {
    text-decoration: underline;
}

@media (max-width: 782px) {
    .integrazo_fwcrm_form-license-facts {
        padding: 14px 16px;
    }
}

/* WP's blue focus ring showed on the link after a click (it opens a new tab). No ring on mouse
   click; keyboard focus keeps a soft purple one. */
.integrazo_fwcrm_form-license-form .integrazo_fwcrm_form-setting-desc a:focus,
.integrazo_fwcrm_form-license-form .integrazo_fwcrm_form-setting-desc a:active {
    outline: none;
    box-shadow: none;
    color: var(--integrazo_fwcrm_form-primary-grad-end, #6a4cf0);
}

.integrazo_fwcrm_form-license-form .integrazo_fwcrm_form-setting-desc a:focus-visible {
    box-shadow: 0 0 0 3px rgba(106, 76, 240, 0.35);
    border-radius: 4px;
}

/* ── License tab: active-license summary card ── */
.integrazo_fwcrm_form-license-hero {
    border: 1px solid var(--integrazo_fwcrm_form-border-100, #eceef5);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.integrazo_fwcrm_form-license-hero-top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    background: linear-gradient(135deg, #f5f2ff 0%, #ffffff 70%);
    border-bottom: 1px solid var(--integrazo_fwcrm_form-border-300, #f1f2f7);
}

.integrazo_fwcrm_form-license-hero-icon {
    background: linear-gradient(135deg, var(--integrazo_fwcrm_form-primary-grad-start, #8b6cf8), var(--integrazo_fwcrm_form-primary-grad-end, #6a4cf0));
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(106, 76, 240, .6);
}

.integrazo_fwcrm_form-license-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 999px;
    background: #e7f7ee;
    color: #138a4b;
    font-size: 12.5px;
    font-weight: 700;
}

.integrazo_fwcrm_form-license-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.integrazo_fwcrm_form-license-status--off {
    background: #fdecec;
    color: #e0393e;
}

.integrazo_fwcrm_form-license-keybox {
    padding: 18px 24px;
}

.integrazo_fwcrm_form-license-keybox-label,
.integrazo_fwcrm_form-license-tile-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--integrazo_fwcrm_form-muted-text, #8a8fa6);
}

.integrazo_fwcrm_form-license-keyrow {
    display: flex;
    align-items: center;
    gap: 10px;
}

.integrazo_fwcrm_form-license-key-masked {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--integrazo_fwcrm_form-border-200, #e4e6ef);
    border-radius: 12px;
    background: #f8f9fc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    letter-spacing: .06em;
    color: var(--integrazo_fwcrm_form-ink, #1b1d2a);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.integrazo_fwcrm_form-license-copy {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--integrazo_fwcrm_form-border-200, #e4e6ef);
    border-radius: 12px;
    background: #fff;
    color: var(--integrazo_fwcrm_form-primary-grad-end, #6a4cf0);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.integrazo_fwcrm_form-license-copy:hover,
.integrazo_fwcrm_form-license-copy:focus {
    background: #f3f0ff;
    border-color: var(--integrazo_fwcrm_form-primary-grad-start, #8b6cf8);
    outline: none;
    box-shadow: none;
}

.integrazo_fwcrm_form-license-copy svg {
    display: block;
}

.integrazo_fwcrm_form-license-copy .integrazo_fwcrm_form-check-icon {
    display: none;
}

.integrazo_fwcrm_form-license-copy.integrazo_fwcrm_form-copied {
    background: #e7f7ee;
    border-color: #138a4b;
    color: #138a4b;
}

.integrazo_fwcrm_form-license-copy.integrazo_fwcrm_form-copied .integrazo_fwcrm_form-copy-icon {
    display: none;
}

.integrazo_fwcrm_form-license-copy.integrazo_fwcrm_form-copied .integrazo_fwcrm_form-check-icon {
    display: block;
}

.integrazo_fwcrm_form-license-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0 24px 22px;
}

.integrazo_fwcrm_form-license-tile {
    padding: 14px 16px;
    border: 1px solid var(--integrazo_fwcrm_form-border-100, #eceef5);
    border-radius: 12px;
    background: #fbfbfe;
}

.integrazo_fwcrm_form-license-tile-label {
    margin-bottom: 6px;
}

.integrazo_fwcrm_form-license-tile-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--integrazo_fwcrm_form-ink, #1b1d2a);
}

@media (max-width: 782px) {
    .integrazo_fwcrm_form-license-hero-top {
        flex-wrap: wrap;
        padding: 18px 16px;
    }
    .integrazo_fwcrm_form-license-keybox {
        padding: 16px;
    }
    .integrazo_fwcrm_form-license-tiles {
        grid-template-columns: minmax(0, 1fr);
        padding: 0 16px 18px;
    }
}

.integrazo_fwcrm_form-license-status--idle {
    background: #f1f2f6;
    color: #6b7085;
}

/* Add / edit connection popup (Settings): error banner inside the wizard-style modal. */
#integrazo_fwcrm_form-auth-popupOverlay .integrazo_fwcrm_form-auth-message {
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
}
#integrazo_fwcrm_form-auth-popupOverlay .integrazo_fwcrm_form-auth-error { background: #fdecec; color: #c0282d; border: 1px solid #f6c9cb; }
#integrazo_fwcrm_form-auth-popupOverlay .integrazo_fwcrm_form-auth-success { background: #e7f7ee; color: #138a4b; border: 1px solid #bfe8d0; }

/* Status column: pill with a "Test connection" button under it. */
.integrazo_fwcrm_form-conn-status-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.integrazo_fwcrm_form-conn-test-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 9px;
    border: 1px solid #e3dcfc;
    border-radius: 7px;
    background: #f5f2ff;
    color: #5b3fe0;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.integrazo_fwcrm_form-conn-test-btn:hover,
.integrazo_fwcrm_form-conn-test-btn:focus {
    background: #ebe5ff;
    border-color: #c9bdfb;
    color: #5b3fe0;
    outline: none;
    box-shadow: none;
}

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

.integrazo_fwcrm_form-conn-test-btn svg {
    flex-shrink: 0;
    display: block;
}

.integrazo_fwcrm_form-conn-test-btn:disabled,
.integrazo_fwcrm_form-conn-test-btn.integrazo_fwcrm_form-loading {
    cursor: not-allowed;
    opacity: .85;
}

.integrazo_fwcrm_form-conn-test-btn.integrazo_fwcrm_form-loading svg {
    display: none;
}

.integrazo_fwcrm_form-conn-test-btn.integrazo_fwcrm_form-loading::before {
    content: "";
    flex-shrink: 0;
    width: 11px;
    height: 11px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 2px solid #c9bdfb;
    border-top-color: #5b3fe0;
    animation: integrazo_fwcrm_form-test-spin .7s linear infinite;
}

@keyframes integrazo_fwcrm_form-test-spin {
    to { transform: rotate(360deg); }
}

/* Status column: only the Test connection button, same look as the Reconnect button. */
.integrazo_fwcrm_form-conn-test-btn {
    height: 30px;
    padding: 0 10px;
    box-sizing: border-box;
    gap: 5px;
    border: 1px solid var(--integrazo_fwcrm_form-border-200, #e4e6ef);
    border-radius: 8px;
    background: #fff;
    color: #5b3fe0;
    font-size: 12.5px;
}

.integrazo_fwcrm_form-conn-test-btn:hover,
.integrazo_fwcrm_form-conn-test-btn:focus {
    background: #f5f2ff;
    border-color: #c9bdfb;
}

.integrazo_fwcrm_form-conn-test-btn.integrazo_fwcrm_form-loading svg {
    display: block;
    animation: integrazo_fwcrm_form-test-spin .8s linear infinite;
}

.integrazo_fwcrm_form-conn-test-btn.integrazo_fwcrm_form-loading::before {
    content: none;
}

/* Add / edit connection popup while it sends you to Zoho: blocked buttons + spinner. */
#integrazo_fwcrm_form-auth-popupOverlay .integrazo_fwcrm_form-conn-modal-foot button:disabled,
#integrazo_fwcrm_form-auth-popupOverlay .integrazo_fwcrm_form-conn-modal-close:disabled {
    cursor: not-allowed;
    opacity: .6;
}

#integrazo_fwcrm_form-auth-popupOverlay .integrazo_fwcrm_form-conn-modal-foot .integrazo_fwcrm_form-loading,
#integrazo_fwcrm_form-auth-popupOverlay .integrazo_fwcrm_form-conn-modal-foot .integrazo_fwcrm_form-loading:disabled {
    opacity: .9;
    cursor: not-allowed;
}

#integrazo_fwcrm_form-auth-popupOverlay .integrazo_fwcrm_form-conn-modal-foot .integrazo_fwcrm_form-loading::before {
    content: "";
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    animation: integrazo_fwcrm_form-auth-spin .7s linear infinite;
}

@keyframes integrazo_fwcrm_form-auth-spin {
    to { transform: rotate(360deg); }
}

/* Connections table: "Modified" cell (date, then time and how long ago). */
.integrazo_fwcrm_form-modified-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.integrazo_fwcrm_form-modified-date {
    font-weight: 600;
    color: var(--integrazo_fwcrm_form-ink, #1b1d2a);
}

.integrazo_fwcrm_form-modified-time {
    font-size: 11.5px;
    color: var(--integrazo_fwcrm_form-muted-text, #8a8fa6);
}

/* Edit connection: the other Zoho product is locked. */
#integrazo_fwcrm_form-auth-popupOverlay .integrazo_fwcrm_form-conn-product:has(input:disabled) {
    opacity: .5;
    background: #f4f5f9;
    cursor: not-allowed;
}

#integrazo_fwcrm_form-auth-popupOverlay .integrazo_fwcrm_form-conn-product:has(input:disabled):hover {
    border-color: var(--integrazo_fwcrm_form-border-200, #e4e6ef);
}

#integrazo_fwcrm_form-auth-popupOverlay .integrazo_fwcrm_form-conn-lock-note {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #7a7f99;
}

#integrazo_fwcrm_form-auth-popupOverlay .integrazo_fwcrm_form-conn-lock-note[hidden] {
    display: none;
}

/* "Reconnect needed" badge beside a connection's Test connection button. */
.integrazo_fwcrm_form-reconnect-badge {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #fdecec;
    color: #c0282d;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: help;
}

/* ── Add / edit connection popup ── */
.integrazo_fwcrm_form-conn-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(22, 20, 45, .45);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.integrazo_fwcrm_form-conn-modal-overlay.show {
    display: flex;
}

.integrazo_fwcrm_form-conn-modal {
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--integrazo_fwcrm_form-card-bg, #fff);
    border-radius: var(--integrazo_fwcrm_form-radius-lg, 20px);
    box-shadow: 0 30px 70px -20px rgba(30, 20, 90, .45);
}

.integrazo_fwcrm_form-conn-modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--integrazo_fwcrm_form-border-100, #eceef5);
}

.integrazo_fwcrm_form-conn-modal-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--integrazo_fwcrm_form-lavender-200, #f1edff);
    flex-shrink: 0;
}

.integrazo_fwcrm_form-conn-modal-logo img {
    width: 24px;
    height: auto;
}

.integrazo_fwcrm_form-conn-modal-head h3 {
    flex: 1;
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--integrazo_fwcrm_form-ink, #1b1d2a);
}

.integrazo_fwcrm_form-conn-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--integrazo_fwcrm_form-muted-text, #8a8fa6);
    cursor: pointer;
}

.integrazo_fwcrm_form-conn-modal-close:hover {
    background: var(--integrazo_fwcrm_form-lavender-100, #ebe5ff);
    color: var(--integrazo_fwcrm_form-primary-text, #5b3fe0);
}

.integrazo_fwcrm_form-conn-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}

.integrazo_fwcrm_form-conn-modal-intro {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #5f6b7a;
}

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

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

.integrazo_fwcrm_form-conn-modal .integrazo_fwcrm_form-input {
    width: 100%;
    max-width: none;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--integrazo_fwcrm_form-border-200, #e4e6ef);
    border-radius: var(--integrazo_fwcrm_form-radius-sm, 8px);
    background-color: #fbfbfe;
    color: var(--integrazo_fwcrm_form-ink, #1b1d2a);
    font-size: 14px;
    box-shadow: none;
}

.integrazo_fwcrm_form-conn-modal .integrazo_fwcrm_form-input:focus {
    border-color: var(--integrazo_fwcrm_form-primary-grad-start, #8b6cf8);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 108, 248, .18);
}

.integrazo_fwcrm_form-conn-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px 20px;
}

.integrazo_fwcrm_form-conn-modal-foot .integrazo_fwcrm_form-btn-primary.integrazo_fwcrm_form-loading {
    opacity: .85;
    cursor: progress;
}

.integrazo_fwcrm_form-conn-modal .integrazo_fwcrm_form-help-icon-wrapper {
    margin: 0;
}

/* API key: eye button at the end of the box (shows / hides the key). The input type decides which eye is drawn. */
.integrazo_fwcrm_form-conn-key-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8a8fa6;
    cursor: pointer;
}

.integrazo_fwcrm_form-conn-key-toggle:hover,
.integrazo_fwcrm_form-conn-key-toggle:focus-visible {
    color: #6a4cf0;
    outline: none;
}

.integrazo_fwcrm_form-conn-key-toggle .integrazo_fwcrm_form-eye-off { display: none; }
.integrazo_fwcrm_form-conn-input-wrap input[type="text"] ~ .integrazo_fwcrm_form-conn-key-toggle .integrazo_fwcrm_form-eye-on { display: none; }
.integrazo_fwcrm_form-conn-input-wrap input[type="text"] ~ .integrazo_fwcrm_form-conn-key-toggle .integrazo_fwcrm_form-eye-off { display: block; }

/* While the saved key loads: a spinner takes the eye's place, the box is read-only and Close / Cancel / Save are blocked. */
.integrazo_fwcrm_form-conn-input-wrap.integrazo_fwcrm_form-conn-key-loading .integrazo_fwcrm_form-conn-key-toggle {
    visibility: hidden;
}

.integrazo_fwcrm_form-conn-input-wrap.integrazo_fwcrm_form-conn-key-loading::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    box-sizing: border-box;
    border: 2px solid #e4e6ef;
    border-top-color: #6a4cf0;
    border-radius: 50%;
    animation: integrazo_fwcrm_form-key-spin .7s linear infinite;
}

@keyframes integrazo_fwcrm_form-key-spin {
    to { transform: rotate(360deg); }
}

.integrazo_fwcrm_form-conn-modal.integrazo_fwcrm_form-conn-key-loading,
.integrazo_fwcrm_form-conn-modal.integrazo_fwcrm_form-conn-key-loading input,
.integrazo_fwcrm_form-conn-modal.integrazo_fwcrm_form-conn-key-loading button,
.integrazo_fwcrm_form-conn-modal.integrazo_fwcrm_form-conn-key-loading button:disabled {
    cursor: not-allowed;
}

.integrazo_fwcrm_form-conn-modal.integrazo_fwcrm_form-conn-key-loading button:disabled {
    opacity: .55;
}

/* Room for the eye button inside the key box. */
.integrazo_fwcrm_form-conn-input-wrap:has(.integrazo_fwcrm_form-conn-key-toggle) input {
    padding-right: 48px !important;
}

/* Help icon: the same outlined "?" circle as the Add / Edit integration screen (Step 1). */
.integrazo_fwcrm_form-conn-modal .integrazo_fwcrm_form-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");
}

.integrazo_fwcrm_form-conn-modal .integrazo_fwcrm_form-help-icon-wrapper:hover .integrazo_fwcrm_form-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");
}

@media (max-width: 560px) {
    .integrazo_fwcrm_form-conn-modal-foot {
        flex-direction: column-reverse;
    }

    .integrazo_fwcrm_form-conn-modal-foot > button {
        width: 100%;
    }
}

/* ── Small pieces used by the lists ── */
.integrazo_fwcrm_form-muted {
    color: var(--integrazo_fwcrm_form-muted-text, #8a8fa6);
}

.integrazo_fwcrm_form-badge-warn {
    background: #fff4e0;
    color: #a65b00;
}

.integrazo_fwcrm_form-filters-wrap {
    max-width: 960px;
}

.integrazo_fwcrm_form-license-copy-label {
    white-space: nowrap;
}

/* "Add Connection" inside the empty Connections message: a button that looks like a link. */
.integrazo_fwcrm_form-hint-link {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    color: var(--integrazo_fwcrm_form-primary-text, #5b3fe0);
    text-decoration: underline;
    cursor: pointer;
}

.integrazo_fwcrm_form-hint-link:hover {
    color: var(--integrazo_fwcrm_form-primary-text-hover, #4b31c9);
}

.integrazo_fwcrm_form-hint-link:focus-visible {
    outline: 2px solid var(--integrazo_fwcrm_form-primary-grad-start, #8b6cf8);
    outline-offset: 2px;
    border-radius: 2px;
}
