/*!
 * Dunes Privacy · Cookie Banner CSS Premium
 * Diseño editorial minimal con paleta theme (negro/harbor)
 */

/* Lock scroll cuando panel abierto */
body.et-consent-locked { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════════
   BANNER — bottom sheet
═══════════════════════════════════════════════════════════════════ */
#et-consent-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 99998;
    background: #fff;
    border: 1px solid #E5E3DD;
    border-radius: 16px;
    box-shadow: 0 24px 48px -16px rgba(10,10,10,0.18), 0 8px 16px -8px rgba(10,10,10,0.10);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0A0A0A;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
    max-width: 1180px;
    margin: 0 auto;
}
#et-consent-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.et-consent__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 22px;
    align-items: center;
    padding: 22px 26px;
}

.et-consent__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #FCFAF4 0%, #F8F4E8 100%);
    border-radius: 14px;
    border: 1px solid #EFEDE7;
}

.et-consent__body {
    min-width: 0;
}
.et-consent__title {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0A0A0A;
    margin: 0 0 6px;
    letter-spacing: -0.4px;
    line-height: 1.25;
}
.et-consent__text {
    font-size: 13.5px;
    line-height: 1.55;
    color: #555452;
    font-weight: 400;
    margin: 0;
}
.et-consent__text a {
    color: #33519F;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.et-consent__text a:hover {
    color: #0A0A0A;
}

.et-consent__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.et-consent__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.1px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: #fff;
    color: #0A0A0A;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    min-width: 110px;
}
.et-consent__btn--primary {
    background: #0A0A0A;
    color: #fff;
    border-color: #0A0A0A;
    box-shadow: 0 4px 12px -4px rgba(10,10,10,0.3);
}
.et-consent__btn--primary:hover {
    background: #33519F;
    border-color: #33519F;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -4px rgba(27,73,101,0.4);
}
.et-consent__btn--secondary {
    background: #FBFBF9;
    color: #0A0A0A;
    border-color: #D4D2CB;
}
.et-consent__btn--secondary:hover {
    background: #F4F3EF;
    border-color: #0A0A0A;
    color: #0A0A0A;
}
.et-consent__btn--ghost {
    background: transparent;
    color: #555452;
    border-color: transparent;
}
.et-consent__btn--ghost:hover {
    color: #0A0A0A;
    background: #F4F3EF;
}

/* Responsive — Mobile */
@media (max-width: 780px) {
    #et-consent-banner {
        bottom: 8px;
        left: 8px;
        right: 8px;
        border-radius: 12px;
    }
    .et-consent__inner {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 18px 18px 16px;
    }
    .et-consent__icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    .et-consent__icon svg {
        width: 28px;
        height: 28px;
    }
    .et-consent__title { font-size: 16px; }
    .et-consent__text  { font-size: 13px; }
    .et-consent__actions {
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }
    .et-consent__btn {
        width: 100%;
        min-width: 0;
        padding: 12px;
    }
    .et-consent__btn--ghost {
        order: 3;  /* Rechazar al final en móvil */
    }
}

/* ═══════════════════════════════════════════════════════════════════
   PANEL DETALLE — modal centrado
═══════════════════════════════════════════════════════════════════ */
#et-consent-panel {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
#et-consent-panel.is-visible {
    opacity: 1;
    pointer-events: auto;
}
.et-consent-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10,10,10,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.et-consent-panel__card {
    position: relative;
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 40px 80px -20px rgba(10,10,10,0.4);
    transform: scale(0.96);
    transition: transform 0.25s ease;
    font-family: 'Inter', sans-serif;
}
#et-consent-panel.is-visible .et-consent-panel__card {
    transform: scale(1);
}

.et-consent-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px 18px;
    border-bottom: 1px solid #EFEDE7;
}
.et-consent-panel__head h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #0A0A0A;
    letter-spacing: -0.4px;
    line-height: 1.25;
}
.et-consent-panel__close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555452;
    transition: all 0.15s;
}
.et-consent-panel__close:hover {
    background: #F4F3EF;
    color: #0A0A0A;
}

.et-consent-panel__body {
    padding: 22px 26px;
    overflow-y: auto;
    flex: 1;
}
.et-consent-panel__intro {
    margin: 0 0 20px;
    font-size: 14px;
    color: #555452;
    line-height: 1.55;
}
.et-consent-panel__intro strong {
    color: #0A0A0A;
    font-weight: 600;
}

.et-consent-cat {
    background: #FBFBF9;
    border: 1px solid #EFEDE7;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 10px;
    transition: border-color 0.15s, background 0.15s;
}
.et-consent-cat:hover {
    border-color: #D4D2CB;
    background: #fff;
}
.et-consent-cat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 6px;
}
.et-consent-cat__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 600;
    color: #0A0A0A;
    letter-spacing: -0.2px;
    flex: 1;
}
.et-consent-cat__pill {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    background: #E5E3DD;
    color: #555452;
}
.et-consent-cat__pill--locked {
    background: #E8F1F7;
    color: #33519F;
}
.et-consent-cat__desc {
    font-size: 12.5px;
    color: #555452;
    line-height: 1.5;
    margin: 0;
}
.et-consent-cat__details {
    margin-top: 14px;
    border-top: 1px solid #EFEDE7;
    padding-top: 14px;
}
.et-consent-cat__details summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #33519F;
    letter-spacing: -0.1px;
}
.et-consent-cat__details p {
    margin: 10px 0 0;
    font-size: 12.5px;
    color: #555452;
    line-height: 1.55;
}
.et-consent-cat__details a {
    color: #33519F;
    text-decoration: underline;
}

/* Toggle iOS-style */
.et-consent-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    cursor: pointer;
    flex-shrink: 0;
}
.et-consent-toggle.is-locked {
    cursor: not-allowed;
    opacity: 0.7;
}
.et-consent-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.et-consent-toggle__track {
    position: absolute;
    inset: 0;
    background: #D4D2CB;
    border-radius: 999px;
    transition: background 0.2s;
}
.et-consent-toggle__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(10,10,10,0.2);
    transition: transform 0.2s;
}
.et-consent-toggle input:checked + .et-consent-toggle__track {
    background: #0A0A0A;
}
.et-consent-toggle input:checked + .et-consent-toggle__track .et-consent-toggle__thumb {
    transform: translateX(18px);
}
.et-consent-toggle.is-locked input:checked + .et-consent-toggle__track {
    background: #33519F;
}

.et-consent-panel__foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 18px 26px 22px;
    border-top: 1px solid #EFEDE7;
    background: #FBFBF9;
    border-radius: 0 0 18px 18px;
}
.et-consent-panel__foot .et-consent__btn--ghost {
    background: transparent;
}
.et-consent-panel__foot .et-consent__btn--primary {
    flex: 1;
    max-width: 280px;
}

@media (max-width: 600px) {
    .et-consent-panel__card { max-height: 96vh; border-radius: 14px; }
    .et-consent-panel__head { padding: 18px 20px 14px; }
    .et-consent-panel__head h2 { font-size: 17px; }
    .et-consent-panel__body { padding: 18px 20px; }
    .et-consent-panel__foot { padding: 14px 20px 18px; flex-direction: column-reverse; }
    .et-consent-panel__foot .et-consent__btn { width: 100%; max-width: 100%; }
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
    #et-consent-banner,
    #et-consent-panel,
    .et-consent-panel__card,
    .et-consent-toggle__thumb,
    .et-consent-toggle__track,
    .et-consent__btn {
        transition: none !important;
    }
}
