/* ============================================================
   BANNER Y MODAL DE COOKIES - OCAMPO
   Cumple con directrices AEPD: rechazo tan fácil como aceptación.
   Todos los botones de un mismo nivel tienen idéntico peso visual.
============================================================ */

/* ===== BANNER ===== */
.oc-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 25px 30px;
    z-index: 99998;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5);
    border-top: 2px solid #a4bd91;
    font-family: inherit;
}
.oc-cookie-banner.oc-show {
    transform: translateY(0);
}

.oc-cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.oc-cookie-banner-text {
    flex: 1 1 320px;
    min-width: 280px;
}
.oc-cookie-banner-text h3 {
    color: #a4bd91;
    letter-spacing: 2px;
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-main, inherit);
}
.oc-cookie-emoji {
    display: inline-block;
    font-size: 22px;
    margin-right: 6px;
    animation: ocCookieBounce 2s ease-in-out infinite;
    transform-origin: 50% 70%;
}
@keyframes ocCookieBounce {
    0%, 100% { transform: rotate(-5deg); }
    50%      { transform: rotate(5deg); }
}
.oc-cookie-banner-text p {
    color: #ccc;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    font-family: Georgia, serif;
}
.oc-cookie-banner-text a {
    color: #a4bd91;
    text-decoration: underline;
}
.oc-cookie-banner-text a:hover {
    color: #bcd6a8;
}

.oc-cookie-banner-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* ===== BOTONES =============================================
   IMPORTANTE: los 3 botones del banner usan EXACTAMENTE el
   mismo estilo. Solo cambia el texto. Cumple la directriz
   AEPD que prohíbe destacar visualmente "Aceptar" sobre
   "Rechazar" o "Configurar" (dark patterns).
============================================================ */
.oc-btn {
    background: transparent;
    color: #fff;
    border: 1.5px solid #a4bd91;
    padding: 12px 22px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1.5px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-main, inherit);
    text-transform: uppercase;
    min-width: 150px;
    line-height: 1;
    box-sizing: border-box;
}
.oc-btn:hover {
    background: #a4bd91;
    color: #0a0a0a;
    transform: translateY(-2px);
}

.oc-btn-primary,
.oc-btn-secondary {
    /* hereda .oc-btn sin overrides */
}

/* ===== MODAL ===== */
.oc-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.oc-cookie-modal.oc-show {
    opacity: 1;
    pointer-events: auto;
}
.oc-cookie-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}
.oc-cookie-modal-content {
    position: relative;
    background: #fff;
    color: #1a1a1a;
    max-width: 620px;
    width: calc(100% - 40px);
    max-height: 85vh;
    overflow-y: auto;
    padding: 36px 36px 28px;
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    border-top: 3px solid #a4bd91;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-main, inherit);
}
.oc-cookie-modal.oc-show .oc-cookie-modal-content {
    transform: scale(1);
}
.oc-cookie-modal-content h2 {
    margin: 0 0 8px;
    font-size: 22px;
    letter-spacing: 1px;
    color: #1a1a1a;
    text-transform: uppercase;
    font-weight: 700;
}
.oc-modal-intro {
    margin: 0 0 24px;
    font-size: 14px;
    color: #555;
    line-height: 1.55;
    font-family: Georgia, serif;
}
.oc-cookie-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.oc-cookie-modal-close:hover {
    background: #f3f3f3;
    color: #1a1a1a;
}

/* ===== CATEGORÍAS ===== */
.oc-cookie-category {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 12px;
    transition: border-color 0.2s ease;
}
.oc-cookie-category:hover {
    border-color: #a4bd91;
}
.oc-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 12px;
}
.oc-cat-head h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.oc-cookie-category p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    font-family: Georgia, serif;
}
.oc-cat-always {
    font-size: 10px;
    background: #eaf2e3;
    color: #4a6b3a;
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
    text-transform: uppercase;
}

/* ===== TOGGLE ===== */
.oc-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.oc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.oc-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: 0.25s ease;
}
.oc-switch-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.oc-switch input:checked + .oc-switch-slider {
    background: #a4bd91;
}
.oc-switch input:checked + .oc-switch-slider::before {
    transform: translateX(20px);
}

/* ===== FOOTER DEL MODAL ===== */
.oc-cookie-modal-footer {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.oc-cookie-modal-footer .oc-btn {
    flex: 1 1 160px;
    color: #1a1a1a;
    border-color: #a4bd91;
    background: transparent;
    min-width: 150px;
}
.oc-cookie-modal-footer .oc-btn:hover {
    background: #a4bd91;
    color: #0a0a0a;
}

/* ===== PLACEHOLDER DE CONTENIDO BLOQUEADO ===== */
.cookie-blocked-content {
    background: linear-gradient(135deg, #2a2a2a 0%, #0a0a0a 100%);
    color: #fff;
    border-radius: 12px;
    border: 1px solid rgba(164, 189, 145, 0.25);
    padding: 40px 30px;
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    box-sizing: border-box;
    width: 100%;
}
.cookie-blocked-content .cookie-icon-big {
    font-size: 48px;
    color: #a4bd91;
    margin-bottom: 4px;
}
.cookie-blocked-content h4 {
    margin: 0;
    font-size: 16px;
    letter-spacing: 1.5px;
    color: #fff;
    text-transform: uppercase;
}
.cookie-blocked-content > p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    max-width: 380px;
    line-height: 1.55;
    font-family: Georgia, serif;
}
.cookie-blocked-content .oc-btn {
    margin-top: 8px;
    color: #fff;
    border-color: #a4bd91;
}
.cookie-blocked-content .oc-btn:hover {
    background: #a4bd91;
    color: #0a0a0a;
}
.cookie-blocked-fallback {
    margin-top: 4px !important;
    font-size: 12px !important;
    font-family: var(--font-main, inherit) !important;
    letter-spacing: 1px;
}
.cookie-blocked-fallback a {
    color: #a4bd91;
    text-decoration: none;
}
.cookie-blocked-fallback a:hover {
    text-decoration: underline;
}

body.oc-modal-open {
    overflow: hidden;
}

/* ============================================================
   RESPONSIVE - MÓVIL (≤768px)
   Anula el flex-grow del texto que en column-mode dejaba un
   hueco vacío enorme entre párrafo y botones.
============================================================ */
@media (max-width: 768px) {
    .oc-cookie-banner {
        padding: 12px 14px 14px;
        border-top-width: 1px;
    }
    .oc-cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    /* IMPORTANTE: anula el flex-basis 320px que en column se
       interpretaba como altura mínima del bloque de texto. */
    .oc-cookie-banner-text {
        flex: 0 0 auto;
        text-align: left;
        min-width: 0;
    }
    .oc-cookie-banner-text h3 {
        font-size: 11px;
        letter-spacing: 1.2px;
        margin-bottom: 4px;
    }
    .oc-cookie-emoji {
        font-size: 15px;
        margin-right: 4px;
        animation: none; /* sin animación en móvil */
    }
    .oc-cookie-banner-text p {
        font-size: 11px;
        line-height: 1.4;
    }
    .oc-cookie-banner-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
    }
    .oc-cookie-banner-buttons .oc-btn {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        padding: 9px 6px;
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    /* MODAL - reducir tamaños */
    .oc-cookie-modal-content {
        padding: 22px 16px 16px;
        max-height: 90vh;
        border-radius: 10px;
    }
    .oc-cookie-modal-content h2 {
        font-size: 16px;
        padding-right: 30px;
        letter-spacing: 0.5px;
    }
    .oc-modal-intro {
        font-size: 12px;
        margin-bottom: 16px;
    }
    .oc-cookie-category {
        padding: 12px 14px;
        margin-bottom: 8px;
    }
    .oc-cat-head h4 {
        font-size: 12px;
    }
    .oc-cookie-category p {
        font-size: 11.5px;
    }
    .oc-cookie-modal-footer {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 16px;
    }
    .oc-cookie-modal-footer .oc-btn {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        padding: 9px 6px;
        font-size: 10px;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 380px) {
    .oc-cookie-banner-buttons .oc-btn,
    .oc-cookie-modal-footer .oc-btn {
        font-size: 9px;
        padding: 8px 4px;
        letter-spacing: 0.3px;
    }
}

/* ============================================================
   ANULA EL HOVER EN PANTALLAS TÁCTILES
   Evita que tras tocar un botón se quede el estado :hover
   "pegado" en verde (lo que pasaba con "ACEPTAR TODAS").
============================================================ */
@media (hover: none) {
    .oc-btn:hover {
        background: transparent;
        color: #fff;
        transform: none;
    }
    .oc-cookie-modal-footer .oc-btn:hover {
        background: transparent;
        color: #1a1a1a;
    }
    .cookie-blocked-content .oc-btn:hover {
        background: transparent;
        color: #fff;
    }
}