/**
 * Styles for header-nxbgd-sgk-compat.blade.php only.
 * Mirrors Tailwind header-nxbgd-sgk.blade.php without loading tw-olm.css.
 */

.nxbgd-sgk-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1021;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 1rem; /* tw-py-4 tw-px-4 */
    background-color: #fff;
    border-bottom: 1px solid #e2e8f0; /* stroke-light */
    box-sizing: border-box;
}

.nxbgd-sgk-header *,
.nxbgd-sgk-header *::before,
.nxbgd-sgk-header *::after {
    box-sizing: border-box;
}

.nxbgd-sgk-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1120px;
}

.nxbgd-sgk-header__left {
    display: flex;
    flex: 1 1 0%;
    min-width: 0;
    align-items: center;
    gap: 0.75rem; /* tw-gap-3 */
}

@media (min-width: 768px) {
    .nxbgd-sgk-header__left {
        gap: 1rem; /* md:tw-gap-4 */
    }
}

.nxbgd-sgk-header__menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px; /* rounded-xl */
    box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    line-height: 0;
    flex-shrink: 0;
}

.nxbgd-sgk-header__menu-btn img {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0.25rem;
    aspect-ratio: 1 / 1;
}

@media (min-width: 768px) {
    .nxbgd-sgk-header__menu-btn {
        display: none;
    }
}

.nxbgd-sgk-header__logos {
    display: flex;
    min-width: 0;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 1rem; /* tw-gap-4 */
}

@media (min-width: 640px) {
    .nxbgd-sgk-header__logos {
        justify-content: flex-start;
    }
}

.nxbgd-sgk-header__logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.nxbgd-sgk-header__logo-nxbgd {
    height: 2rem; /* tw-h-8 */
    width: auto;
    aspect-ratio: 56 / 48;
}

.nxbgd-sgk-header__logo-olm {
    height: 2rem;
    width: auto;
}

.nxbgd-sgk-header__logo-olm--full {
    display: none;
    aspect-ratio: 148 / 48;
}

.nxbgd-sgk-header__logo-olm--icon {
    display: block;
    aspect-ratio: 1 / 1;
}

@media (min-width: 640px) {
    .nxbgd-sgk-header__logo-olm--full {
        display: block;
    }

    .nxbgd-sgk-header__logo-olm--icon {
        display: none;
    }
}

@media (min-width: 768px) {
    .nxbgd-sgk-header__logo-nxbgd,
    .nxbgd-sgk-header__logo-olm {
        height: 2.5rem; /* md:tw-h-10 */
    }
}

.nxbgd-sgk-header__divider {
    display: none;
    width: 2px;
    height: 2rem; /* tw-h-8 */
    background-color: #f3f4f6; /* gray-100 */
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .nxbgd-sgk-header__divider {
        display: block;
    }
}

.nxbgd-sgk-header__right {
    display: none;
    flex-shrink: 0;
    align-items: center;
    gap: 1rem; /* tw-gap-4 */
}

@media (min-width: 768px) {
    .nxbgd-sgk-header__right {
        display: flex;
    }
}

.nxbgd-sgk-header__auth {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem; /* tw-gap-2 */
}

@media (min-width: 640px) {
    .nxbgd-sgk-header__auth {
        gap: 0.75rem; /* sm:tw-gap-3 */
    }
}

/* Match tw-olm-btn-tertiary-48 */
.nxbgd-sgk-header__btn-register,
.nxbgd-sgk-header__btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 124px;
    height: 3rem;
    padding: 0.5rem 1rem;
    gap: 0.25rem;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: -0.32px;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.nxbgd-sgk-header__btn-register {
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow:
        0 1px 1px 0 #f1f5f9 inset,
        0 -3px 0 0 #f1f5f9 inset;
    color: #fc6803 !important;
}

.nxbgd-sgk-header__btn-register:hover,
.nxbgd-sgk-header__btn-register:focus,
.nxbgd-sgk-header__btn-register:active {
    border: 1px solid #ffe3d5;
    background: #fff1ea;
    box-shadow: none;
    color: #fc6803 !important;
    text-decoration: none !important;
}

/* Match tw-olm-btn-primary-48 */
.nxbgd-sgk-header__btn-login {
    border: none;
    background: radial-gradient(
        553.55% 141.42% at 100% 100%,
        #fc6803 0%,
        #ff8a53 100%
    );
    box-shadow:
        inset 1px 2px 4px 0 rgba(255, 255, 255, 0.5),
        inset -1px -4px 2px 0 rgba(0, 0, 0, 0.1);
    color: #fff !important;
}

.nxbgd-sgk-header__btn-login:hover,
.nxbgd-sgk-header__btn-login:focus,
.nxbgd-sgk-header__btn-login:active {
    background: #fc6803;
    color: #fff !important;
    text-decoration: none !important;
}

/* CSDL GDĐT login — match original group button */
.nxbgd-sgk-header__csdl {
    display: inline-flex;
    height: 2.5rem; /* tw-h-10 */
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0 0.5rem;
    color: #0f172a;
    text-decoration: none !important;
    transition: all 0.15s ease;
}

@media (min-width: 640px) {
    .nxbgd-sgk-header__csdl {
        padding-left: 0.625rem;
        padding-right: 0.625rem;
    }
}

@media (min-width: 1024px) {
    .nxbgd-sgk-header__csdl {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

.nxbgd-sgk-header__csdl:hover {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
    text-decoration: none !important;
    color: #0f172a;
}

.nxbgd-sgk-header__csdl:focus-visible {
    outline: 2px solid #5c5bff;
    outline-offset: 2px;
}

.nxbgd-sgk-header__csdl-logo-wrap {
    display: flex;
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 9999px;
    box-shadow: 0 0 0 1px #e2e8f0;
}

.nxbgd-sgk-header__csdl-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nxbgd-sgk-header__csdl-label {
    display: none;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25rem;
    letter-spacing: -0.025em;
    white-space: nowrap;
}

@media (min-width: 1024px) {
    .nxbgd-sgk-header__csdl-label {
        display: inline;
    }
}

/* Tủ sách — accent #5C5BFF */
.nxbgd-sgk-header__bookshelf {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 2px solid #5c5bff;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    color: #5c5bff;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nxbgd-sgk-header__bookshelf span {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    color: #5c5bff;
    transition: color 0.2s ease;
}

.nxbgd-sgk-header__bookshelf svg path {
    transition: fill 0.2s ease;
}

.nxbgd-sgk-header__bookshelf:hover {
    background-color: #5c5bff;
    color: #fff !important;
    text-decoration: none !important;
}

.nxbgd-sgk-header__bookshelf:hover span {
    color: #fff;
}

.nxbgd-sgk-header__bookshelf:hover svg path {
    fill: #fff;
}

.nxbgd-sgk-header__avatar-trigger {
    position: relative;
    cursor: pointer;
}

.nxbgd-sgk-header__avatar {
    width: 3rem; /* tw-w-12 tw-h-12 */
    height: 3rem;
}

.nxbgd-sgk-header__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9999px;
}

.nxbgd-sgk-header__popup {
    position: absolute;
    top: 3.5rem; /* tw-top-14 */
    right: 0;
    z-index: 10;
}

/* digital-library.js / training.js toggleClass("tw-hidden") */
.nxbgd-sgk-header .tw-hidden {
    display: none !important;
}

.nxbgd-sgk-header-spacer {
    width: 100%;
    height: 71px;
}

@media (min-width: 768px) {
    .nxbgd-sgk-header-spacer {
        height: 81px;
    }
}
