/* ============================================================
   OLEA Medical Center – Cookie Consent
   RGPD · Ley 34/2002 LSSI
   ============================================================ */

/* ── Banner ───────────────────────────────────────────────────── */
#olea-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(12, 13, 16, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(174, 152, 88, 0.28);
    padding: 1.125rem 0;
    box-shadow: 0 -6px 32px rgba(0, 0, 0, 0.45);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

#olea-cookie-banner.olea-banner-visible {
    transform: translateY(0);
}

.olea-banner-text {
    color: #c8c8c8;
    font-size: 0.875rem;
    line-height: 1.55;
}

.olea-banner-text a {
    color: var(--olea-secondary, #AE9858);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.olea-banner-text a:hover {
    color: #c9b070;
}

/* ── Button set ───────────────────────────────────────────────── */
.olea-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-cookie-accept {
    background: var(--olea-primary, #6C7040);
    color: #fff;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 0.4375rem 1.125rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-cookie-accept:hover {
    background: var(--olea-primary-dark, #565929);
    box-shadow: 0 2px 8px rgba(108, 112, 64, 0.4);
}

.btn-cookie-reject {
    background: transparent;
    color: #999;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    padding: 0.4375rem 1.125rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-cookie-reject:hover {
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-cookie-config {
    background: transparent;
    color: var(--olea-secondary, #AE9858);
    border: 1px solid rgba(174, 152, 88, 0.45);
    border-radius: 4px;
    padding: 0.4375rem 1.125rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-cookie-config:hover {
    background: rgba(174, 152, 88, 0.1);
    border-color: var(--olea-secondary, #AE9858);
}

/* ── Modal ────────────────────────────────────────────────────── */
#olea-cookie-modal .modal-content {
    background: #16171c;
    border: 1px solid rgba(174, 152, 88, 0.2);
    border-radius: 8px;
    color: #c0c0c0;
}

#olea-cookie-modal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 1.25rem 1.5rem;
}

#olea-cookie-modal .modal-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.0625rem;
}

#olea-cookie-modal .modal-body {
    padding: 1.25rem 1.5rem;
}

#olea-cookie-modal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0.875rem 1.5rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Cookie category card ─────────────────────────────────────── */
.olea-cookie-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 0.875rem 1.125rem;
    margin-bottom: 0.75rem;
}

.olea-cookie-category:last-child {
    margin-bottom: 0;
}

.olea-cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.375rem;
    gap: 0.75rem;
}

.olea-cookie-category-title {
    font-weight: 600;
    color: #e8e8e8;
    font-size: 0.9375rem;
}

.olea-cookie-category-desc {
    font-size: 0.8rem;
    color: #808080;
    line-height: 1.5;
    margin: 0;
}

/* Badge "Siempre activas" */
.olea-badge-required {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--olea-secondary, #AE9858);
    background: rgba(174, 152, 88, 0.1);
    border: 1px solid rgba(174, 152, 88, 0.28);
    border-radius: 3px;
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Toggle switch ────────────────────────────────────────────── */
.olea-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.olea-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.olea-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #3a3a42;
    border-radius: 24px;
    transition: background 0.25s;
}

.olea-switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
}

.olea-switch input:checked + .olea-switch-slider {
    background: var(--olea-primary, #6C7040);
}

.olea-switch input:checked + .olea-switch-slider::before {
    transform: translateX(20px);
}

.olea-switch input:disabled + .olea-switch-slider {
    opacity: 0.5;
    cursor: default;
}

.olea-switch input:focus-visible + .olea-switch-slider {
    outline: 2px solid var(--olea-secondary, #AE9858);
    outline-offset: 2px;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    #olea-cookie-banner {
        padding: 0.875rem 0;
    }

    .olea-banner-actions {
        margin-top: 0.625rem;
        width: 100%;
    }

    .btn-cookie-accept,
    .btn-cookie-reject,
    .btn-cookie-config {
        flex: 1 1 auto;
        text-align: center;
    }
}
