/**
 * ConsentPilot — Refined cookie consent UI.
 *
 * Aesthetic: warm editorial elegance with glassmorphism,
 * smooth micro-interactions, and premium feel.
 *
 * Typography: local editorial serif + system sans-serif.
 * Palette: warm ivory, deep charcoal, amber-gold accent.
 */

/* ==========================================================================
   1. Custom Properties — Light (default)
   ========================================================================== */

:root {
    /* Core palette */
    --cp-accent: #c8956c;
    --cp-accent-hover: #b07e58;
    --cp-accent-soft: rgba(200, 149, 108, 0.12);
    --cp-accent-glow: rgba(200, 149, 108, 0.25);

    /* Surfaces */
    --cp-bg: rgba(255, 253, 250, 0.88);
    --cp-bg-solid: #fffdf8;
    --cp-bg-card: rgba(255, 255, 255, 0.72);
    --cp-bg-hover: rgba(200, 149, 108, 0.06);

    /* Text */
    --cp-text: #2c2520;
    --cp-text-secondary: #7a706a;
    --cp-text-muted: #a89e97;
    --cp-text-inverse: #fffdf8;

    /* Borders & dividers */
    --cp-border: rgba(44, 37, 32, 0.08);
    --cp-border-strong: rgba(44, 37, 32, 0.14);
    --cp-divider: rgba(44, 37, 32, 0.06);

    /* Overlays */
    --cp-overlay: rgba(28, 22, 18, 0.45);
    --cp-backdrop: blur(20px) saturate(180%);

    /* Shadows — layered for depth */
    --cp-shadow-sm: 0 1px 2px rgba(28, 22, 18, 0.04);
    --cp-shadow: 0 4px 24px rgba(28, 22, 18, 0.08), 0 1px 4px rgba(28, 22, 18, 0.04);
    --cp-shadow-lg: 0 12px 48px rgba(28, 22, 18, 0.12), 0 4px 16px rgba(28, 22, 18, 0.06);
    --cp-shadow-banner: 0 -6px 40px rgba(28, 22, 18, 0.08), 0 -1px 6px rgba(28, 22, 18, 0.03);
    --cp-shadow-float: 0 8px 32px rgba(28, 22, 18, 0.14), 0 2px 8px rgba(28, 22, 18, 0.06);

    /* Toggle */
    --cp-toggle-bg: #d6cfc9;
    --cp-toggle-bg-on: var(--cp-accent);
    --cp-toggle-knob: #ffffff;
    --cp-toggle-shadow: 0 1px 3px rgba(28, 22, 18, 0.18);

    /* Radii */
    --cp-radius-xs: 6px;
    --cp-radius-sm: 10px;
    --cp-radius: 16px;
    --cp-radius-lg: 24px;
    --cp-radius-pill: 999px;

    /* Typography */
    --cp-font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --cp-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --cp-font-size-xs: 0.6875rem;
    --cp-font-size-sm: 0.8125rem;
    --cp-font-size-base: 0.9375rem;
    --cp-font-size-lg: 1.125rem;
    --cp-font-size-xl: 1.5rem;
    --cp-font-size-2xl: 2rem;
    --cp-lh: 1.55;
    --cp-lh-tight: 1.2;

    /* Motion */
    --cp-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --cp-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --cp-ease-out: cubic-bezier(0, 0, 0.2, 1);
    --cp-dur-fast: 0.18s;
    --cp-dur: 0.3s;
    --cp-dur-slow: 0.5s;

    /* Focus */
    --cp-focus-ring: 0 0 0 2px var(--cp-bg-solid), 0 0 0 4px var(--cp-accent);

    /* Z-index */
    --cp-z-banner: 999990;
    --cp-z-modal: 999999;
    --cp-z-floating: 999980;
}

/* ==========================================================================
   2. Dark Mode
   ========================================================================== */

[data-consentpilot-theme="dark"] {
    --cp-accent: #d4a574;
    --cp-accent-hover: #e0b68a;
    --cp-accent-soft: rgba(212, 165, 116, 0.14);
    --cp-accent-glow: rgba(212, 165, 116, 0.2);

    --cp-bg: rgba(32, 28, 26, 0.92);
    --cp-bg-solid: #1c1917;
    --cp-bg-card: rgba(42, 38, 35, 0.8);
    --cp-bg-hover: rgba(212, 165, 116, 0.08);

    --cp-text: #f5f0eb;
    --cp-text-secondary: #a39890;
    --cp-text-muted: #706660;
    --cp-text-inverse: #1c1917;

    --cp-border: rgba(245, 240, 235, 0.08);
    --cp-border-strong: rgba(245, 240, 235, 0.14);
    --cp-divider: rgba(245, 240, 235, 0.06);

    --cp-overlay: rgba(12, 10, 9, 0.6);
    --cp-shadow-banner: 0 -6px 40px rgba(0, 0, 0, 0.25);
    --cp-shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.15);
    --cp-shadow-float: 0 8px 32px rgba(0, 0, 0, 0.35);

    --cp-toggle-bg: #44403c;
    --cp-toggle-bg-on: var(--cp-accent);
    --cp-toggle-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   3. Auto Mode
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    [data-consentpilot-theme="auto"] {
        --cp-accent: #d4a574;
        --cp-accent-hover: #e0b68a;
        --cp-accent-soft: rgba(212, 165, 116, 0.14);
        --cp-accent-glow: rgba(212, 165, 116, 0.2);

        --cp-bg: rgba(32, 28, 26, 0.92);
        --cp-bg-solid: #1c1917;
        --cp-bg-card: rgba(42, 38, 35, 0.8);
        --cp-bg-hover: rgba(212, 165, 116, 0.08);

        --cp-text: #f5f0eb;
        --cp-text-secondary: #a39890;
        --cp-text-muted: #706660;
        --cp-text-inverse: #1c1917;

        --cp-border: rgba(245, 240, 235, 0.08);
        --cp-border-strong: rgba(245, 240, 235, 0.14);
        --cp-divider: rgba(245, 240, 235, 0.06);

        --cp-overlay: rgba(12, 10, 9, 0.6);
        --cp-shadow-banner: 0 -6px 40px rgba(0, 0, 0, 0.25);
        --cp-shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.15);
        --cp-shadow-float: 0 8px 32px rgba(0, 0, 0, 0.35);

        --cp-toggle-bg: #44403c;
        --cp-toggle-bg-on: var(--cp-accent);
        --cp-toggle-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
}

/* ==========================================================================
   4. Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   5. Keyframes
   ========================================================================== */

@keyframes cp-slide-up {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cp-slide-down {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cp-fade-scale {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes cp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes cp-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ==========================================================================
   6. Banner
   ========================================================================== */

.consentpilot-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: var(--cp-z-banner);
    background: var(--cp-bg);
    backdrop-filter: var(--cp-backdrop);
    -webkit-backdrop-filter: var(--cp-backdrop);
    color: var(--cp-text);
    font-family: var(--cp-font-body);
    font-size: var(--cp-font-size-base);
    line-height: var(--cp-lh);
    box-sizing: border-box;
    border-top: 1px solid var(--cp-border);
}

.consentpilot-banner *,
.consentpilot-banner *::before,
.consentpilot-banner *::after {
    box-sizing: border-box;
}

.consentpilot-banner[hidden] {
    display: none !important;
}

/* --- Positions --- */
.consentpilot-banner--bottom {
    bottom: 0;
    box-shadow: var(--cp-shadow-banner);
    animation: cp-slide-up var(--cp-dur-slow) var(--cp-ease) both;
}

.consentpilot-banner--top {
    top: 0;
    bottom: auto;
    border-top: none;
    border-bottom: 1px solid var(--cp-border);
    box-shadow: 0 6px 40px rgba(28, 22, 18, 0.08);
    animation: cp-slide-down var(--cp-dur-slow) var(--cp-ease) both;
}

.consentpilot-banner--center {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cp-overlay);
    backdrop-filter: blur(4px);
    border: none;
    box-shadow: none;
    animation: cp-fade-in var(--cp-dur) var(--cp-ease) both;
}

.consentpilot-banner--center .consentpilot-banner__inner {
    background: var(--cp-bg);
    backdrop-filter: var(--cp-backdrop);
    -webkit-backdrop-filter: var(--cp-backdrop);
    border-radius: var(--cp-radius-lg);
    box-shadow: var(--cp-shadow-lg);
    border: 1px solid var(--cp-border);
    max-width: 540px;
    width: calc(100% - 32px);
    animation: cp-fade-scale var(--cp-dur-slow) var(--cp-ease) both;
    animation-delay: 0.1s;
}

/* --- Inner layout --- */
.consentpilot-banner__inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 24px 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

/* --- Content --- */
.consentpilot-banner__content {
    flex: 1 1 380px;
    min-width: 0;
}

.consentpilot-banner__title {
    margin: 0 0 6px;
    font-family: var(--cp-font-display);
    font-size: var(--cp-font-size-xl);
    font-weight: 400;
    font-style: italic;
    line-height: var(--cp-lh-tight);
    color: var(--cp-text);
    letter-spacing: -0.01em;
}

.consentpilot-banner__text {
    margin: 0 0 10px;
    font-size: var(--cp-font-size-sm);
    color: var(--cp-text-secondary);
    line-height: var(--cp-lh);
    max-width: 52ch;
}

.consentpilot-banner__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--cp-accent);
    font-size: var(--cp-font-size-xs);
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: color var(--cp-dur-fast) var(--cp-ease);
}

.consentpilot-banner__link::after {
    content: '\2197';
    font-size: 0.75em;
    opacity: 0.7;
}

.consentpilot-banner__link:hover,
.consentpilot-banner__link:focus-visible {
    color: var(--cp-accent-hover);
}

/* --- Actions --- */
.consentpilot-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

/* ==========================================================================
   7. Buttons
   ========================================================================== */

.consentpilot-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 22px;
    border: 1.5px solid transparent;
    border-radius: var(--cp-radius-pill);
    font-family: var(--cp-font-body);
    font-size: var(--cp-font-size-sm);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition:
        background-color var(--cp-dur-fast) var(--cp-ease),
        border-color var(--cp-dur-fast) var(--cp-ease),
        color var(--cp-dur-fast) var(--cp-ease),
        box-shadow var(--cp-dur-fast) var(--cp-ease),
        transform var(--cp-dur-fast) var(--cp-ease-bounce);
    -webkit-tap-highlight-color: transparent;
}

.consentpilot-btn:active {
    transform: scale(0.97);
}

.consentpilot-btn:focus-visible {
    outline: none;
    box-shadow: var(--cp-focus-ring);
}

/* Accept — filled warm accent, equal visual weight with reject (CNIL) */
.consentpilot-btn--accept {
    background: var(--cp-accent);
    color: var(--cp-text-inverse);
    border-color: var(--cp-accent);
}

.consentpilot-btn--accept:hover {
    background: var(--cp-accent-hover);
    border-color: var(--cp-accent-hover);
    box-shadow: 0 4px 16px var(--cp-accent-glow);
}

/* Reject — filled secondary, equal prominence */
.consentpilot-btn--reject {
    background: var(--cp-text);
    color: var(--cp-bg-solid);
    border-color: var(--cp-text);
}

.consentpilot-btn--reject:hover {
    background: var(--cp-text-secondary);
    border-color: var(--cp-text-secondary);
}

/* Preferences / outline */
.consentpilot-btn--outline {
    background: transparent;
    color: var(--cp-text);
    border-color: var(--cp-border-strong);
}

.consentpilot-btn--outline:hover {
    background: var(--cp-bg-hover);
    border-color: var(--cp-accent);
    color: var(--cp-accent);
}

/* Save — accent style */
.consentpilot-btn--save {
    background: var(--cp-accent);
    color: var(--cp-text-inverse);
    border-color: var(--cp-accent);
}

.consentpilot-btn--save:hover {
    background: var(--cp-accent-hover);
    border-color: var(--cp-accent-hover);
    box-shadow: 0 4px 16px var(--cp-accent-glow);
}

/* Ghost */
.consentpilot-btn--ghost {
    background: transparent;
    color: var(--cp-text-secondary);
    border-color: transparent;
    padding-left: 16px;
    padding-right: 16px;
}

.consentpilot-btn--ghost:hover {
    color: var(--cp-text);
    background: var(--cp-bg-hover);
}

/* ==========================================================================
   8. Modal
   ========================================================================== */

.consentpilot-modal {
    position: fixed;
    inset: 0;
    z-index: var(--cp-z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--cp-font-body);
    font-size: var(--cp-font-size-base);
    line-height: var(--cp-lh);
    color: var(--cp-text);
    box-sizing: border-box;
}

.consentpilot-modal *,
.consentpilot-modal *::before,
.consentpilot-modal *::after {
    box-sizing: border-box;
}

.consentpilot-modal[hidden] {
    display: none !important;
}

.consentpilot-modal__overlay {
    position: absolute;
    inset: 0;
    background: var(--cp-overlay);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
    animation: cp-fade-in var(--cp-dur) var(--cp-ease) both;
}

.consentpilot-modal__dialog {
    position: relative;
    background: var(--cp-bg);
    backdrop-filter: var(--cp-backdrop);
    -webkit-backdrop-filter: var(--cp-backdrop);
    border: 1px solid var(--cp-border);
    border-radius: var(--cp-radius-lg);
    box-shadow: var(--cp-shadow-lg);
    width: calc(100% - 32px);
    max-width: 520px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cp-fade-scale var(--cp-dur-slow) var(--cp-ease) both;
    animation-delay: 0.06s;
}

/* Decorative gradient line at top */
.consentpilot-modal__dialog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cp-accent), transparent);
    border-radius: 2px;
    opacity: 0.5;
}

/* --- Header --- */
.consentpilot-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 16px;
    flex-shrink: 0;
}

.consentpilot-modal__title {
    margin: 0;
    font-family: var(--cp-font-display);
    font-size: var(--cp-font-size-xl);
    font-weight: 400;
    font-style: italic;
    line-height: var(--cp-lh-tight);
    color: var(--cp-text);
}

.consentpilot-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--cp-border);
    border-radius: var(--cp-radius-sm);
    background: transparent;
    color: var(--cp-text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition:
        background var(--cp-dur-fast) var(--cp-ease),
        color var(--cp-dur-fast) var(--cp-ease),
        border-color var(--cp-dur-fast) var(--cp-ease);
}

.consentpilot-modal__close:hover {
    background: var(--cp-bg-hover);
    border-color: var(--cp-border-strong);
    color: var(--cp-text);
}

.consentpilot-modal__close:focus-visible {
    outline: none;
    box-shadow: var(--cp-focus-ring);
}

/* --- Body --- */
.consentpilot-modal__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 4px 28px 16px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--cp-border-strong) transparent;
}

.consentpilot-modal__body::-webkit-scrollbar {
    width: 4px;
}

.consentpilot-modal__body::-webkit-scrollbar-thumb {
    background: var(--cp-border-strong);
    border-radius: 4px;
}

/* --- Category blocks --- */
.consentpilot-modal__category {
    padding: 18px 0;
    border-bottom: 1px solid var(--cp-divider);
    animation: cp-fade-in var(--cp-dur) var(--cp-ease) both;
}

.consentpilot-modal__category:nth-child(1) { animation-delay: 0.08s; }
.consentpilot-modal__category:nth-child(2) { animation-delay: 0.14s; }
.consentpilot-modal__category:nth-child(3) { animation-delay: 0.20s; }
.consentpilot-modal__category:nth-child(4) { animation-delay: 0.26s; }
.consentpilot-modal__category:nth-child(5) { animation-delay: 0.32s; }

.consentpilot-modal__category:last-child {
    border-bottom: none;
}

.consentpilot-modal__category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.consentpilot-modal__category-title {
    margin: 0;
    font-size: var(--cp-font-size-base);
    font-weight: 600;
    color: var(--cp-text);
}

.consentpilot-modal__category-desc {
    margin: 6px 0 0;
    font-size: var(--cp-font-size-sm);
    color: var(--cp-text-secondary);
    line-height: var(--cp-lh);
}

/* ==========================================================================
   9. Toggle Switch — premium feel
   ========================================================================== */

.consentpilot-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.consentpilot-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.consentpilot-toggle__slider {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    background: var(--cp-toggle-bg);
    border-radius: 14px;
    transition: background-color var(--cp-dur) var(--cp-ease);
}

.consentpilot-toggle__slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: var(--cp-toggle-knob);
    border-radius: 50%;
    box-shadow: var(--cp-toggle-shadow);
    transition:
        transform var(--cp-dur) var(--cp-ease-bounce),
        box-shadow var(--cp-dur) var(--cp-ease);
}

/* Checked state */
.consentpilot-toggle input:checked + .consentpilot-toggle__slider {
    background: var(--cp-toggle-bg-on);
}

.consentpilot-toggle input:checked + .consentpilot-toggle__slider::before {
    transform: translateX(20px);
    box-shadow: var(--cp-toggle-shadow), 0 0 0 1px var(--cp-accent-glow);
}

/* Focus */
.consentpilot-toggle input:focus-visible + .consentpilot-toggle__slider {
    box-shadow: var(--cp-focus-ring);
}

/* Disabled */
.consentpilot-toggle input:disabled + .consentpilot-toggle__slider {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Badge — "Toujours actif" */
.consentpilot-modal__badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: var(--cp-font-size-xs);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--cp-accent);
    background: var(--cp-accent-soft);
    border-radius: var(--cp-radius-pill);
    white-space: nowrap;
}

/* ==========================================================================
   10. Modal Footer
   ========================================================================== */

.consentpilot-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 28px 24px;
    flex-shrink: 0;
}

/* ==========================================================================
   11. Floating Button
   ========================================================================== */

.consentpilot-floating-btn {
    position: fixed;
    z-index: var(--cp-z-floating);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 1px solid var(--sp-border, transparent);
    border-radius: 50%;
    /* Couleurs du thème Sérénopause : l'icône (stroke="currentColor") héritait du
       texte de la page, presque blanc en mode sombre, sur un fond blanc fixe. */
    background: var(--sp-surface, #ffffff);
    color: var(--sp-brand-primary, #9a3f68);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition:
        box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: cp-fade-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.8s;
}

.consentpilot-floating-btn:hover {
    box-shadow:
        0 10px 32px rgba(200, 134, 74, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px) scale(1.08);
}

.consentpilot-floating-btn:active {
    transform: translateY(0) scale(0.94);
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.06);
}

.consentpilot-floating-btn:hover {
    color: var(--sp-brand-primary-dark, #74304f);
}

.consentpilot-floating-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px var(--sp-surface, #ffffff),
        0 0 0 5px var(--sp-brand-primary, #C8956C),
        0 6px 20px rgba(0, 0, 0, 0.12);
}

html[data-sp-theme="dark"] .consentpilot-floating-btn {
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.45),
        0 2px 6px rgba(0, 0, 0, 0.3);
}

.consentpilot-floating-btn--bottom-left  { bottom: 24px; left: 24px; }
.consentpilot-floating-btn--bottom-right { bottom: 24px; right: 24px; }

.consentpilot-floating-btn__icon {
    display: block;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
}

/* ==========================================================================
   12. Embed Placeholder
   ========================================================================== */

.consentpilot-embed {
    position: relative;
    width: 100%;
    min-height: 200px;
    background:
        linear-gradient(135deg, var(--cp-bg-card) 0%, var(--cp-bg-solid) 100%);
    border: 1.5px dashed var(--cp-border-strong);
    border-radius: var(--cp-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--cp-font-body);
    color: var(--cp-text);
    overflow: hidden;
    box-sizing: border-box;
}

/* Shimmer effect */
.consentpilot-embed::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--cp-accent-soft) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: cp-shimmer 3s linear infinite;
    opacity: 0.5;
    pointer-events: none;
}

.consentpilot-embed--active {
    border: none;
    background: none;
}

.consentpilot-embed--active::before {
    display: none;
}

.consentpilot-embed__placeholder {
    position: relative;
    text-align: center;
    padding: 32px 24px;
    max-width: 380px;
    z-index: 1;
}

.consentpilot-embed__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: var(--cp-accent-soft);
    border-radius: 50%;
    color: var(--cp-accent);
}

.consentpilot-embed__icon svg {
    display: block;
    width: 22px;
    height: 22px;
}

.consentpilot-embed__service {
    margin: 0 0 6px;
    font-family: var(--cp-font-display);
    font-size: var(--cp-font-size-lg);
    font-weight: 400;
    font-style: italic;
    color: var(--cp-text);
}

.consentpilot-embed__message {
    margin: 0 0 20px;
    font-size: var(--cp-font-size-sm);
    color: var(--cp-text-secondary);
    line-height: var(--cp-lh);
}

.consentpilot-embed__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1.5px solid var(--cp-accent);
    border-radius: var(--cp-radius-pill);
    background: transparent;
    color: var(--cp-accent);
    font-family: var(--cp-font-body);
    font-size: var(--cp-font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition:
        background var(--cp-dur-fast) var(--cp-ease),
        color var(--cp-dur-fast) var(--cp-ease),
        box-shadow var(--cp-dur-fast) var(--cp-ease);
}

.consentpilot-embed__btn:hover {
    background: var(--cp-accent);
    color: var(--cp-text-inverse);
    box-shadow: 0 4px 16px var(--cp-accent-glow);
}

.consentpilot-embed__btn:focus-visible {
    outline: none;
    box-shadow: var(--cp-focus-ring);
}

/* Shortcode embed placeholder */
.consentpilot-embed-placeholder {
    position: relative;
    background: linear-gradient(135deg, var(--cp-bg-card) 0%, var(--cp-bg-solid) 100%);
    border: 1.5px dashed var(--cp-border-strong);
    border-radius: var(--cp-radius);
    overflow: hidden;
    font-family: var(--cp-font-body);
}

.consentpilot-embed-placeholder__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}

.consentpilot-embed-placeholder__text {
    margin: 0 0 16px;
    text-align: center;
    font-size: var(--cp-font-size-sm);
    color: var(--cp-text-secondary);
    max-width: 40ch;
}

.consentpilot-embed-placeholder__btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: 1.5px solid var(--cp-accent);
    border-radius: var(--cp-radius-pill);
    background: transparent;
    color: var(--cp-accent);
    font-family: var(--cp-font-body);
    font-size: var(--cp-font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--cp-dur-fast) var(--cp-ease), color var(--cp-dur-fast) var(--cp-ease);
}

.consentpilot-embed-placeholder__btn:hover {
    background: var(--cp-accent);
    color: var(--cp-text-inverse);
}

/* ==========================================================================
   13. Preferences link & button (shortcodes)
   ========================================================================== */

.consentpilot-preferences-link,
.consentpilot-preferences-btn {
    color: var(--cp-accent);
    font-family: var(--cp-font-body);
    cursor: pointer;
    transition: color var(--cp-dur-fast) var(--cp-ease);
}

.consentpilot-preferences-link:hover,
.consentpilot-preferences-btn:hover {
    color: var(--cp-accent-hover);
}

/* ==========================================================================
   14. Responsive
   ========================================================================== */

@media (max-width: 640px) {
    .consentpilot-banner__inner {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 16px;
    }

    .consentpilot-banner__title {
        font-size: var(--cp-font-size-lg);
    }

    .consentpilot-banner__actions {
        flex-direction: column;
    }

    .consentpilot-btn {
        width: 100%;
        justify-content: center;
    }

    .consentpilot-modal__dialog {
        width: calc(100% - 16px);
        max-height: calc(100vh - 24px);
        border-radius: var(--cp-radius);
    }

    .consentpilot-modal__header {
        padding: 20px 20px 12px;
    }

    .consentpilot-modal__body {
        padding: 4px 20px 12px;
    }

    .consentpilot-modal__footer {
        padding: 12px 20px 20px;
        flex-direction: column;
    }

    .consentpilot-modal__footer .consentpilot-btn {
        width: 100%;
        justify-content: center;
    }

    .consentpilot-modal__dialog::before {
        left: 16px;
        right: 16px;
    }

    .consentpilot-floating-btn {
        width: 48px;
        height: 48px;
    }

    .consentpilot-floating-btn__icon {
        width: 28px;
        height: 28px;
    }

    .consentpilot-floating-btn--bottom-left  { bottom: 16px; left: 16px; }
    .consentpilot-floating-btn--bottom-right { bottom: 16px; right: 16px; }
}

/* Plugin 1.6 adds a kicker line this design never had. */
.consentpilot-kicker {
    display: none;
}
