/* =========================================================
   JaimeDiaz.TV — Acceso y menú de cuenta
   ========================================================= */

.jdr-account {
    position: relative;
    flex: 0 0 auto;
}

.jdr-account__trigger {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 9px 13px;

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 13px;

    color: #ffffff;
    background: rgba(255, 255, 255, 0.055);

    font: inherit;
    font-size: 0.76rem;
    font-weight: 750;

    cursor: pointer;

    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        transform 160ms ease;
}

.jdr-account__trigger:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.10);
}

.jdr-account__trigger:active {
    transform: translateY(1px);
}

.jdr-account__trigger:focus-visible,
.jdr-account__close:focus-visible,
.jdr-account-auth__submit:focus-visible,
.jdr-account-menu a:focus-visible,
.jdr-account__links a:focus-visible {
    outline: 3px solid rgba(244, 115, 33, 0.32);
    outline-offset: 3px;
}

.jdr-account__trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 1rem;
}

.jdr-account__trigger--logged {
    max-width: 178px;
    padding: 6px 10px 6px 7px;
}

.jdr-account__avatar {
    width: 30px;
    height: 30px;

    flex: 0 0 auto;

    border: 2px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;

    object-fit: cover;
    background: #ffffff;
}

.jdr-account__trigger-user {
    min-width: 0;

    display: grid;
    gap: 1px;

    text-align: left;
}

.jdr-account__trigger-user strong,
.jdr-account__trigger-user small {
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.jdr-account__trigger-user strong {
    font-size: 0.69rem;
    line-height: 1.2;
}

.jdr-account__trigger-user small {
    color: rgba(255, 255, 255, 0.64);

    font-size: 0.57rem;
    line-height: 1.2;
}

.jdr-account__trigger--logged > .fa-chevron-down {
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.58rem;
}


/* =========================================================
   Overlay y diálogo
   ========================================================= */

.jdr-account__overlay {
    position: fixed;
    z-index: 1400;
    inset: 0;

    display: grid;
    place-items: center;

    padding: 24px;

    opacity: 0;

    background: rgba(8, 19, 31, 0.64);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    transition: opacity 180ms ease;
}

.jdr-account__overlay.is-visible {
    opacity: 1;
}

.jdr-account__overlay[hidden] {
    display: none;
}

.jdr-account__dialog {
    position: relative;

    width: min(100%, 440px);
    max-height: min(760px, calc(100vh - 48px));

    overflow-y: auto;

    padding: 32px;

    border: 1px solid rgba(23, 35, 60, 0.10);
    border-radius: 24px;

    color: #182238;
    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #ffffff 78%,
            #fff8ee 100%
        );

    opacity: 0;
    transform: translateY(14px) scale(0.985);

    box-shadow:
        0 30px 90px rgba(5, 20, 34, 0.30);

    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.jdr-account__overlay.is-visible
.jdr-account__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.jdr-account__close {
    position: absolute;
    top: 18px;
    right: 18px;

    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e5eaf1;
    border-radius: 11px;

    color: #667085;
    background: #f7f9fc;

    font-size: 0.95rem;

    cursor: pointer;

    transition:
        color 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease;
}

.jdr-account__close:hover {
    color: #e85d0f;
    border-color: rgba(244, 115, 33, 0.24);
    background: #fff8ee;
}


/* =========================================================
   Cabecera del acceso
   ========================================================= */

.jdr-account__header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 16px;

    padding-right: 38px;
}

.jdr-account__brand {
    width: 54px;
    height: 54px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 15px;

    color: #ffffff;
    background: #d8a437;

    font-size: 0.95rem;
    font-weight: 850;

    box-shadow:
        0 10px 24px rgba(216, 164, 55, 0.24);
}

.jdr-account__eyebrow {
    display: block;

    margin-bottom: 4px;

    color: #c86515;

    font-size: 0.65rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.jdr-account__header h2,
.jdr-account-profile h2 {
    margin: 0;

    color: #17233c;

    font-size: 1.75rem;
    font-weight: 850;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.jdr-account__header p,
.jdr-account-profile p {
    margin: 8px 0 0;

    color: #667085;

    font-size: 0.82rem;
    line-height: 1.5;
}


/* =========================================================
   Formulario
   ========================================================= */

.jdr-account-auth {
    display: grid;
    gap: 16px;

    margin-top: 28px;
}

.jdr-account-auth__field {
    display: grid;
    gap: 7px;
}

.jdr-account-auth__field label {
    color: #273551;

    font-size: 0.72rem;
    font-weight: 750;
}

.jdr-account-auth__control {
    min-height: 50px;

    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 11px;

    padding: 0 15px;

    border: 1px solid #dce3ed;
    border-radius: 13px;

    color: #8490a4;
    background: #f8fafc;

    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.jdr-account-auth__control:focus-within {
    border-color: rgba(244, 115, 33, 0.58);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(244, 115, 33, 0.09);
}

.jdr-account-auth__control input {
    width: 100%;
    min-width: 0;
    height: 48px;

    padding: 0;

    border: 0;
    outline: 0;

    color: #182238;
    background: transparent;

    font: inherit;
    font-size: 0.83rem;
}

.jdr-account-auth__control input::placeholder {
    color: #a1abbb;
}

.jdr-account-auth__submit {
    min-height: 50px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    margin-top: 2px;
    padding: 12px 18px;

    border: 0;
    border-radius: 13px;

    color: #ffffff;
    background: #17233c;

    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 12px 26px rgba(23, 35, 60, 0.20);

    transition:
        background-color 160ms ease,
        transform 160ms ease;
}

.jdr-account-auth__submit:hover {
    background: #233a61;
    transform: translateY(-1px);
}

.jdr-account__links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-top: 20px;
    padding-top: 18px;

    border-top: 1px solid #e8edf3;
}

.jdr-account__links a {
    color: #667085;

    font-size: 0.69rem;
    font-weight: 700;
    text-decoration: none;
}

.jdr-account__links a:last-child {
    color: #c86515;
}

.jdr-account__links a:hover {
    color: #e85d0f;
}

.jdr-account__socials:empty {
    display: none;
}

.jdr-account__socials {
    display: flex;
    justify-content: center;
    gap: 10px;

    margin-top: 18px;
}

.jdr-account__socials a {
    width: 40px;
    height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e2e7ef;
    border-radius: 11px;

    color: #233a61;
    background: #ffffff;

    text-decoration: none;
}


/* =========================================================
   Usuario conectado
   ========================================================= */

.jdr-account-profile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;

    padding-right: 38px;
}

.jdr-account-profile > img {
    width: 66px;
    height: 66px;

    border: 3px solid #ffffff;
    border-radius: 18px;

    object-fit: cover;
    background: #f1f4f8;

    box-shadow:
        0 10px 24px rgba(23, 35, 60, 0.14);
}

.jdr-account-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;

    margin-top: 26px;
}

.jdr-account-menu a {
    min-width: 0;
    min-height: 78px;

    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;

    padding: 14px;

    border: 1px solid #e5eaf1;
    border-radius: 14px;

    color: #273551;
    background: #f9fafc;

    font-size: 0.73rem;
    font-weight: 750;
    text-decoration: none;

    transition:
        color 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease,
        transform 160ms ease;
}

.jdr-account-menu a:hover {
    color: #d76716;
    border-color: rgba(244, 115, 33, 0.24);
    background: #fff9f0;
    transform: translateY(-1px);
}

.jdr-account-menu a > i {
    color: #76839a;
    font-size: 1rem;
}

.jdr-account-menu a small {
    min-width: 22px;
    height: 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 5px;

    border-radius: 999px;

    color: #9c620d;
    background: #fff2d7;

    font-size: 0.6rem;
}

.jdr-account__footer {
    display: flex;
    justify-content: flex-end;

    margin-top: 20px;
    padding-top: 18px;

    border-top: 1px solid #e8edf3;
}

.jdr-account__footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: #667085;

    font-size: 0.72rem;
    font-weight: 750;
    text-decoration: none;
}

.jdr-account__footer a:hover {
    color: #e85d0f;
}

body.jdr-account-is-open {
    overflow: hidden;
}


/* =========================================================
   Adaptación
   ========================================================= */

@media (max-width: 1120px) {

    .jdr-account__trigger-label,
    .jdr-account__trigger-user {
        display: none;
    }

    .jdr-account__trigger--logged {
        padding: 6px 8px;
    }

    .jdr-account__trigger--logged > .fa-chevron-down {
        display: none;
    }

}

@media (max-width: 760px) {

    .jdr-header-actions
    > .jdr-account
    > .jdr-account__trigger {
        display: none;
    }

    .jdr-account__overlay {
        align-items: end;

        padding: 12px;
    }

    .jdr-account__dialog {
        width: 100%;
        max-height: calc(100vh - 24px);

        padding: 26px 20px 22px;

        border-radius: 22px;
    }

    .jdr-account-menu {
        grid-template-columns: 1fr;
    }

    .jdr-account-menu a {
        min-height: 58px;
    }

}

@media (max-width: 420px) {

    .jdr-account__header,
    .jdr-account-profile {
        grid-template-columns: 1fr;
    }

    .jdr-account__brand {
        width: 48px;
        height: 48px;
    }

    .jdr-account__links {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .jdr-account__overlay,
    .jdr-account__dialog {
        transition-duration: 1ms;
    }

}
