.cookie-consent[hidden],
.cookie-preferences[hidden] {
    display: none !important;
}

.cookie-consent {
    position: fixed;
    right: 22px;
    bottom: 22px;
    left: 22px;
    z-index: 10050;
    max-width: 1180px;
    margin: auto;
    padding: 22px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 18px;
    color: #fff;
    background: rgba(25, 20, 48, .97);
    box-shadow: 0 24px 80px rgba(15, 12, 35, .32);
    backdrop-filter: blur(14px);
}

.cookie-consent-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.cookie-consent-copy {
    flex: 1;
}

.cookie-consent h2 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 21px;
}

.cookie-consent p {
    margin: 0;
    color: #d6d1e4;
    font-size: 15px;
    line-height: 1.55;
}

.cookie-consent p a {
    color: #fff;
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.cookie-button {
    min-height: 44px;
    padding: 10px 17px;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 10px;
    color: #fff;
    background: transparent;
    font-weight: 700;
    cursor: pointer;
}

.cookie-button.primary {
    border-color: #11a982;
    background: #11a982;
}

.cookie-button:hover {
    transform: translateY(-1px);
}

.cookie-preferences {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(16, 13, 30, .62);
}

.cookie-preferences-card {
    width: min(680px, 100%);
    max-height: min(780px, 92vh);
    overflow: auto;
    padding: 28px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(0,0,0,.25);
}

.cookie-preferences-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.cookie-preferences-header h2 {
    margin: 0;
    font-size: 26px;
}

.cookie-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #f0f1f5;
    font-size: 24px;
    cursor: pointer;
}

.cookie-category {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid #e7e8ed;
}

.cookie-category h3 {
    margin: 0 0 7px;
    font-size: 18px;
}

.cookie-category p {
    margin: 0;
    color: #686e7c;
    font-size: 14px;
    line-height: 1.55;
}

.cookie-switch {
    position: relative;
    width: 48px;
    height: 27px;
}

.cookie-switch input {
    position: absolute;
    opacity: 0;
}

.cookie-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #c8ccd6;
    cursor: pointer;
}

.cookie-switch span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgba(0,0,0,.18);
    transition: transform .2s ease;
}

.cookie-switch input:checked + span {
    background: #11a982;
}

.cookie-switch input:checked + span::after {
    transform: translateX(21px);
}

.cookie-switch input:disabled + span {
    opacity: .65;
    cursor: not-allowed;
}

.cookie-preferences-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 22px;
    border-top: 1px solid #e7e8ed;
}

.cookie-preferences-actions .cookie-button {
    color: #2a2e38;
    border-color: #cfd3dc;
}

.cookie-preferences-actions .cookie-button.primary {
    color: #fff;
    border-color: #11a982;
}

@media (max-width: 767px) {
    .cookie-consent {
        right: 12px;
        bottom: 12px;
        left: 12px;
        padding: 18px;
    }

    .cookie-consent-inner {
        display: block;
    }

    .cookie-consent-actions {
        justify-content: stretch;
        margin-top: 16px;
    }

    .cookie-consent-actions .cookie-button {
        flex: 1 1 100%;
    }

    .cookie-preferences-card {
        padding: 22px 18px;
    }

    .cookie-preferences-actions {
        display: grid;
    }
}

/* =========================================================
   POSICIÓN DEL AVISO
   ========================================================= */
.cookie-consent {
    right: auto;
    left: 50%;
    width: calc(100% - 32px);
    max-width: 1120px;
    margin: 0;
    transform: translateX(-50%);
}

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

@media (max-width: 767px) {
    .cookie-consent {
        right: auto;
        left: 50%;
        width: calc(100% - 24px);
        transform: translateX(-50%);
    }
}
