/**
 * YourBestDev — Banner de consentimiento de cookies.
 *
 * Barra inferior no bloqueante, accesible y responsive. No cubre el
 * contenido: solo ocupa la franja inferior de la ventana.
 */

.ybd-consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9998;
    pointer-events: none;
    font-family: inherit;
    line-height: 1.5;
}

.ybd-consent[hidden] {
    display: none !important;
}

.ybd-consent__inner {
    pointer-events: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 22px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 22px;
    background: #0b1220;
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}

.ybd-consent__text {
    flex: 1 1 420px;
    min-width: 220px;
}

.ybd-consent__title {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.ybd-consent__desc {
    margin: 0;
    font-size: 0.875rem;
    color: #cbd5e1;
}

.ybd-consent__desc a {
    color: #67e8f9;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ybd-consent__desc a:hover,
.ybd-consent__desc a:focus {
    color: #a5f3fc;
}

.ybd-consent__actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
    align-items: center;
}

.ybd-consent__btn {
    appearance: none;
    min-width: 112px;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ybd-consent__btn--accept {
    background: #0891b2;
    border-color: #0891b2;
    color: #ffffff;
}

.ybd-consent__btn--accept:hover {
    background: #0e7490;
    border-color: #0e7490;
}

.ybd-consent__btn--reject {
    background: transparent;
    border-color: rgba(203, 213, 225, 0.55);
    color: #e5e7eb;
}

.ybd-consent__btn--reject:hover {
    background: rgba(148, 163, 184, 0.16);
    border-color: #cbd5e1;
}

.ybd-consent__btn:focus-visible,
.ybd-consent__reset:focus-visible,
.ybd-consent-reset-link:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

.ybd-consent__reset {
    appearance: none;
    background: none;
    border: 0;
    padding: 4px 2px;
    color: #94a3b8;
    font: inherit;
    font-size: 0.8125rem;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.ybd-consent__reset:hover {
    color: #e2e8f0;
}

/* Enlace permanente para reabrir el consentimiento tras decidir. */
.ybd-consent-reset-link {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9997;
    appearance: none;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(11, 18, 32, 0.92);
    color: #cbd5e1;
    font: inherit;
    font-size: 0.75rem;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.ybd-consent-reset-link:hover {
    color: #ffffff;
    border-color: rgba(148, 163, 184, 0.65);
}

.ybd-consent-reset-link[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    .ybd-consent {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .ybd-consent__inner {
        padding: 16px;
        gap: 14px;
        max-height: 62vh;
        overflow-y: auto;
    }

    .ybd-consent__text {
        flex-basis: 100%;
    }

    .ybd-consent__actions {
        width: 100%;
        gap: 8px;
    }

    .ybd-consent__btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .ybd-consent__reset {
        width: 100%;
        text-align: left;
    }

    .ybd-consent-reset-link {
        left: 10px;
        bottom: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ybd-consent__btn {
        transition: none;
    }
}
