/* Incito cookie consent — banner + modal + toggles.
   Uses the marketing site's existing design tokens where available
   (--rich-black, --deep-teal) and falls back to literal values so the
   widget still looks right on pages that don't include styles.css. */

.incito-cc-hidden { display: none !important; }

.incito-cc-banner {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 920px;
    background: #ffffff;
    color: #161928;
    border: 1px solid #e0e3e8;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(20, 25, 40, 0.18);
    padding: 20px 24px;
    z-index: 9998;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.incito-cc-banner.incito-cc-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.incito-cc-banner-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}

.incito-cc-banner-text h3 {
    margin: 0 0 4px;
    font-family: "Host Grotesk", "Inter", sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #161928;
}

.incito-cc-banner-text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #4b5060;
}

.incito-cc-banner-text p a {
    color: #0c8f82;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.incito-cc-banner-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.incito-cc-btn {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 999px;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.06s ease;
    line-height: 1;
}

.incito-cc-btn:active { transform: translateY(1px); }
.incito-cc-btn:focus-visible {
    outline: 2px solid #5ce0d2;
    outline-offset: 2px;
}

.incito-cc-btn-primary {
    background: #5ce0d2;
    color: #161928;
}
.incito-cc-btn-primary:hover { background: #48c7ba; }

.incito-cc-btn-secondary {
    background: #ffffff;
    color: #161928;
    border-color: #e0e3e8;
}
.incito-cc-btn-secondary:hover { border-color: #9aa0ae; }

.incito-cc-btn-ghost {
    background: transparent;
    color: #4b5060;
    border-color: transparent;
    padding-left: 8px;
    padding-right: 8px;
}
.incito-cc-btn-ghost:hover { color: #161928; }

/* Modal */
.incito-cc-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 22, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.incito-cc-backdrop.incito-cc-visible { opacity: 1; }

.incito-cc-modal {
    background: #ffffff;
    color: #161928;
    width: 100%;
    max-width: 520px;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    padding: 24px 24px 20px;
    font-family: "Inter", system-ui, sans-serif;
    transform: scale(0.96);
    transition: transform 0.2s ease;
    max-height: calc(100vh - 32px);
    overflow: auto;
}
.incito-cc-backdrop.incito-cc-visible .incito-cc-modal { transform: scale(1); }

.incito-cc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.incito-cc-modal-head h2 {
    margin: 0;
    font-family: "Host Grotesk", "Inter", sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.incito-cc-close {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4b5060;
}
.incito-cc-close:hover { background: #f1f3f6; color: #161928; }
.incito-cc-close:focus-visible {
    outline: 2px solid #5ce0d2;
    outline-offset: 2px;
}

.incito-cc-modal-intro {
    margin: 4px 0 16px;
    font-size: 13px;
    line-height: 1.55;
    color: #4b5060;
}

.incito-cc-category {
    border-top: 1px solid #eef0f4;
    padding: 16px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px 16px;
    align-items: center;
}
.incito-cc-category:last-of-type { border-bottom: 1px solid #eef0f4; }

.incito-cc-category-name {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #161928;
}

.incito-cc-category-desc {
    margin: 2px 0 0;
    grid-column: 1 / 2;
    font-size: 12.5px;
    line-height: 1.5;
    color: #6b7184;
}

/* Toggle: unchecked=gray, checked=teal, disabled=darker gray */
.incito-cc-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.incito-cc-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.incito-cc-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #d9dde5;
    border-radius: 999px;
    transition: background 0.18s ease;
}
.incito-cc-toggle-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    transition: transform 0.18s ease;
}
.incito-cc-toggle input:checked + .incito-cc-toggle-slider { background: #5ce0d2; }
.incito-cc-toggle input:checked + .incito-cc-toggle-slider::before { transform: translateX(18px); }
.incito-cc-toggle input:disabled + .incito-cc-toggle-slider {
    cursor: not-allowed;
    opacity: 0.75;
}
.incito-cc-toggle input:focus-visible + .incito-cc-toggle-slider {
    outline: 2px solid #5ce0d2;
    outline-offset: 2px;
}

.incito-cc-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Mobile: stack everything */
@media (max-width: 640px) {
    .incito-cc-banner {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
        transform: translateY(16px);
        padding: 16px 18px;
    }
    .incito-cc-banner.incito-cc-visible {
        transform: translateY(0);
    }
    .incito-cc-banner-grid {
        grid-template-columns: 1fr;
    }
    .incito-cc-banner-actions {
        justify-content: flex-start;
    }
    .incito-cc-modal {
        padding: 20px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .incito-cc-banner,
    .incito-cc-backdrop,
    .incito-cc-modal,
    .incito-cc-toggle-slider,
    .incito-cc-toggle-slider::before {
        transition: none !important;
    }
}
