/* ==========================================================
   PodeTech — Aviso y preferencias de cookies
   ========================================================== */

#pt-cookie-consent-root,
#pt-cookie-consent-root * {
    box-sizing: border-box;
}

#pt-cookie-consent-root [hidden] {
    display: none !important;
}

/* Elimina visualmente la ruta solicitada en IRCPode. */
.page-ircpode-no-breadcrumb nav[aria-label="Ruta"],
.page-ircpode-no-breadcrumb nav[aria-label="ruta"],
.page-ircpode-no-breadcrumb .irc-ref-breadcrumb,
.page-ircpode-no-breadcrumb .irc-ref-breadcrumbs,
.page-ircpode-no-breadcrumb .ircpode-breadcrumb,
.page-ircpode-no-breadcrumb .ircpode-breadcrumbs,
.page-ircpode-no-breadcrumb [class*="breadcrumb"] {
    display: none !important;
}

.pt-cookie-banner {
    position: fixed;
    right: 22px;
    bottom: 22px;
    left: 22px;
    z-index: 99990;

    width: min(calc(100% - 44px), 1180px);
    margin-inline: auto;

    border: 1px solid rgba(71, 197, 231, .34);
    border-radius: 20px;

    color: #f4f8ff;

    background:
        radial-gradient(
            circle at 92% 5%,
            rgba(119, 232, 60, .10),
            transparent 25rem
        ),
        linear-gradient(
            145deg,
            rgba(7, 29, 46, .985),
            rgba(3, 14, 27, .99)
        );

    box-shadow:
        0 30px 85px rgba(0, 0, 0, .62),
        0 0 40px rgba(40, 211, 239, .08);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    animation:
        ptCookieEnter .34s cubic-bezier(.2,.75,.25,1);
}

.pt-cookie-banner-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;

    padding: 23px 25px;
}

.pt-cookie-copy {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
}

.pt-cookie-icon {
    display: grid;
    width: 48px;
    height: 48px;

    place-items: center;

    border: 1px solid rgba(43, 216, 244, .38);
    border-radius: 15px;

    color: #29d8f4;
    background: rgba(41, 216, 244, .07);

    font-size: 1.32rem;

    box-shadow:
        0 0 25px rgba(41, 216, 244, .08);
}

.pt-cookie-copy h2 {
    margin: 0 0 6px;

    color: #f5f9ff;

    font-family: inherit;
    font-size: 1.05rem;
    line-height: 1.25;
}

.pt-cookie-copy p {
    max-width: 780px;
    margin: 0;

    color: #aab9ca;

    font-family: inherit;
    font-size: .79rem;
    line-height: 1.58;
}

.pt-cookie-copy a {
    color: #35d8f3;
    text-decoration: underline;
    text-decoration-color: rgba(53, 216, 243, .45);
    text-underline-offset: 3px;
}

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

.pt-cookie-button {
    display: inline-flex;
    min-height: 43px;

    align-items: center;
    justify-content: center;

    padding: 0 16px;

    border: 1px solid rgba(144, 188, 221, .31);
    border-radius: 11px;

    color: #edf5ff;
    background: rgba(255,255,255,.035);

    font: inherit;
    font-size: .75rem;
    font-weight: 800;

    cursor: pointer;

    transition:
        transform .18s ease,
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}

.pt-cookie-button:hover,
.pt-cookie-button:focus-visible {
    border-color: #29d8f4;
    background: rgba(41, 216, 244, .08);
    transform: translateY(-2px);
}

.pt-cookie-button:focus-visible {
    outline: 2px solid #29d8f4;
    outline-offset: 3px;
}

.pt-cookie-button-primary {
    border-color: transparent;

    color: #071108;

    background:
        linear-gradient(
            135deg,
            #8ded43,
            #64d637
        );

    box-shadow:
        0 13px 32px rgba(104, 225, 57, .17);
}

.pt-cookie-button-primary:hover,
.pt-cookie-button-primary:focus-visible {
    border-color: transparent;
    background:
        linear-gradient(
            135deg,
            #9af154,
            #70de42
        );
}

.pt-cookie-button-quiet {
    border-color: transparent;
    color: #a8b9ca;
    background: transparent;
}

/* Fondo del panel de preferencias */

.pt-cookie-modal-layer {
    position: fixed;
    inset: 0;
    z-index: 99998;

    display: grid;
    place-items: center;

    padding: 22px;

    background: rgba(0, 6, 14, .76);

    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);

    animation:
        ptCookieFade .20s ease;
}

.pt-cookie-modal {
    width: min(100%, 650px);
    max-height: min(820px, calc(100vh - 44px));
    overflow-y: auto;

    border: 1px solid rgba(67, 197, 231, .35);
    border-radius: 21px;

    color: #f4f8ff;

    background:
        radial-gradient(
            circle at 90% 0%,
            rgba(121, 232, 60, .09),
            transparent 23rem
        ),
        linear-gradient(
            145deg,
            #071d2f,
            #03101e
        );

    box-shadow:
        0 35px 95px rgba(0, 0, 0, .70);

    animation:
        ptCookieModalEnter .25s cubic-bezier(.2,.75,.25,1);
}

.pt-cookie-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    padding: 25px 25px 20px;

    border-bottom: 1px solid rgba(135, 180, 216, .16);
}

.pt-cookie-modal-header span {
    display: block;
    margin-bottom: 7px;

    color: #29d8f4;

    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.pt-cookie-modal-header h2 {
    margin: 0;

    color: #f4f8ff;

    font-size: 1.45rem;
    line-height: 1.15;
}

.pt-cookie-close {
    display: grid;
    width: 38px;
    height: 38px;

    flex: 0 0 auto;
    place-items: center;

    border: 1px solid rgba(142, 187, 221, .27);
    border-radius: 11px;

    color: #dce7f4;
    background: rgba(255,255,255,.03);

    font: inherit;
    font-size: 1.2rem;

    cursor: pointer;
}

.pt-cookie-modal-content {
    display: grid;
    gap: 11px;

    padding: 21px 25px;
}

.pt-cookie-intro {
    margin: 0 0 5px;

    color: #a6b7c9;

    font-size: .80rem;
    line-height: 1.62;
}

.pt-cookie-category {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;

    padding: 17px;

    border: 1px solid rgba(131, 179, 216, .17);
    border-radius: 14px;

    background: rgba(255,255,255,.025);
}

.pt-cookie-category strong {
    display: block;
    margin-bottom: 4px;

    color: #eef5ff;
    font-size: .83rem;
}

.pt-cookie-category p {
    margin: 0;

    color: #8fa3b8;

    font-size: .70rem;
    line-height: 1.50;
}

.pt-cookie-category-status {
    display: inline-flex;
    min-width: 74px;
    min-height: 30px;

    align-items: center;
    justify-content: center;

    padding: 0 9px;

    border: 1px solid rgba(119, 232, 60, .28);
    border-radius: 999px;

    color: #83eb49;
    background: rgba(119, 232, 60, .065);

    font-size: .62rem;
    font-weight: 820;
}

.pt-cookie-switch {
    position: relative;
    display: inline-flex;
    width: 52px;
    height: 29px;

    flex: 0 0 auto;
}

.pt-cookie-switch input {
    position: absolute;
    width: 1px;
    height: 1px;

    opacity: 0;
    pointer-events: none;
}

.pt-cookie-switch-track {
    position: absolute;
    inset: 0;

    border: 1px solid rgba(144, 187, 220, .31);
    border-radius: 999px;

    background: #0b2033;

    cursor: pointer;

    transition:
        border-color .18s ease,
        background .18s ease;
}

.pt-cookie-switch-track::after {
    position: absolute;
    top: 4px;
    left: 4px;

    width: 19px;
    height: 19px;

    border-radius: 50%;
    background: #8da0b4;

    content: "";

    transition:
        transform .18s ease,
        background .18s ease;
}

.pt-cookie-switch input:checked + .pt-cookie-switch-track {
    border-color: #72df3e;
    background: rgba(108, 221, 57, .18);
}

.pt-cookie-switch input:checked
+ .pt-cookie-switch-track::after {
    background: #7de843;
    transform: translateX(23px);
}

.pt-cookie-switch input:focus-visible
+ .pt-cookie-switch-track {
    outline: 2px solid #29d8f4;
    outline-offset: 3px;
}

.pt-cookie-unavailable {
    color: #8094aa;
    font-size: .63rem;
    font-weight: 760;
    text-align: right;
}

.pt-cookie-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;

    padding: 19px 25px 25px;

    border-top: 1px solid rgba(135, 180, 216, .16);
}

/* Botón para volver a abrir preferencias */

.pt-cookie-reopen {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 99970;

    display: inline-flex;
    min-height: 38px;

    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 0 12px;

    border: 1px solid rgba(78, 190, 222, .30);
    border-radius: 999px;

    color: #a9bacb;
    background: rgba(3, 16, 29, .92);

    box-shadow:
        0 12px 30px rgba(0,0,0,.38);

    backdrop-filter: blur(14px);

    font: inherit;
    font-size: .66rem;
    font-weight: 760;

    cursor: pointer;

    transition:
        color .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

.pt-cookie-reopen:hover,
.pt-cookie-reopen:focus-visible {
    border-color: #29d8f4;
    color: #eef6ff;
    transform: translateY(-2px);
}

.pt-cookie-policy-block {
    border-top: 1px solid rgba(131, 179, 216, .14);
}

.pt-cookie-policy-card {
    padding: 27px;

    border: 1px solid rgba(131, 179, 216, .18);
    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(8, 28, 45, .88),
            rgba(4, 15, 27, .94)
        );
}

.pt-cookie-policy-card h2 {
    margin-top: 0;
}

.pt-cookie-policy-card li {
    margin-bottom: 7px;
}

.pt-cookie-policy-button {
    display: inline-flex;
    min-height: 43px;

    align-items: center;
    justify-content: center;

    margin-top: 12px;
    padding: 0 16px;

    border: 1px solid rgba(43, 210, 239, .35);
    border-radius: 11px;

    color: #29d8f4;
    background: rgba(41, 216, 244, .06);

    font: inherit;
    font-size: .76rem;
    font-weight: 800;

    cursor: pointer;
}

body.pt-cookie-dialog-open {
    overflow: hidden;
}

@keyframes ptCookieEnter {
    from {
        opacity: 0;
        transform: translateY(25px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ptCookieFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ptCookieModalEnter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 860px) {
    .pt-cookie-banner-inner {
        grid-template-columns: 1fr;
    }

    .pt-cookie-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .pt-cookie-banner {
        right: 10px;
        bottom: 10px;
        left: 10px;

        width: calc(100% - 20px);
        border-radius: 17px;
    }

    .pt-cookie-banner-inner {
        gap: 18px;
        padding: 19px;
    }

    .pt-cookie-copy {
        grid-template-columns: 40px minmax(0, 1fr);
        align-items: flex-start;
    }

    .pt-cookie-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .pt-cookie-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .pt-cookie-button {
        width: 100%;
    }

    .pt-cookie-button-primary {
        grid-column: 1 / -1;
    }

    .pt-cookie-modal-layer {
        padding: 10px;
    }

    .pt-cookie-modal {
        max-height: calc(100vh - 20px);
        border-radius: 17px;
    }

    .pt-cookie-modal-header,
    .pt-cookie-modal-content,
    .pt-cookie-modal-actions {
        padding-inline: 18px;
    }

    .pt-cookie-modal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .pt-cookie-category {
        grid-template-columns: 1fr;
    }

    .pt-cookie-unavailable {
        text-align: left;
    }

    .pt-cookie-reopen {
        bottom: 10px;
        left: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #pt-cookie-consent-root *,
    #pt-cookie-consent-root *::before,
    #pt-cookie-consent-root *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}
