/* =============================================
   MENU DRAWER
============================================= */

/* 드로어 컨테이너 */
.menu-drawer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
    visibility: hidden;
}
.menu-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}

/* 오버레이 (클릭 감지용 / 모바일 배경) */
.drawer-overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.menu-drawer.is-open .drawer-overlay {
    opacity: 1;
}

/* =============================================
   PC: 드롭다운 카드
============================================= */
@media (min-width: 961px) {

    /* PC: 오버레이 투명 (클릭 감지만) */
    .drawer-overlay {
        background: transparent;
    }

    /* PC: 카드 형태 패널 */
    .drawer-panel {
        position: absolute;
        top: 100px;   /* 헤더 바로 아래 */
        right: max(20px, calc((100vw - 1282px) / 2 + 20px));
        width: 300px;
        height: auto;
        background: #fff;
        box-shadow: 0 8px 40px 0 rgba(42, 54, 99, 0.12);
        overflow-y: auto;
        overflow-x: hidden;
        /* 열리기 전: 위로 약간 올라가 있고 투명 */
        transform: translateY(-6px);
        opacity: 0;
        transition: transform 0.2s ease, opacity 0.2s ease;
        pointer-events: none;
    }
    .menu-drawer.is-open .drawer-panel {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
}

/* =============================================
   Mobile: 전체 높이 슬라이드 패널
============================================= */
@media (max-width: 1024px) {

    /* 모바일: 다크 블러 오버레이 */
    .drawer-overlay {
        background: rgba(33, 33, 33, 0.3);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }

    /* 모바일: 오른쪽에서 슬라이드인 패널 */
    .drawer-panel {
        position: absolute;
        top: 0;
        right: 0;
        width: 300px;
        height: 100%;
        background: #fff;
        overflow-y: auto;
        overflow-x: hidden;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        pointer-events: none;
    }
    .menu-drawer.is-open .drawer-panel {
        transform: translateX(0);
        pointer-events: auto;
    }
}

/* =============================================
   드로어 내부 공통 스타일
============================================= */

/* 헤더 아이콘 영역 */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 30px 20px 0;
}

.drawer-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}
.drawer-icon-btn img {
    width: 24px;
    height: 24px;
    display: block;
}

/* ===== 로그인: 프로필 영역 ===== */
.drawer-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px 20px;
}

.drawer-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    background: #eef0f5;
    flex-shrink: 0;
}
.drawer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.drawer-member-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(42, 54, 99, 0.05);
    margin-top: 12px;
}
.drawer-member-badge--corp {
    background: rgba(255, 160, 0, 0.05);
}
.drawer-badge-icon {
    width: 16px;
    height: 14px;
    display: block;
}
.drawer-badge-text {
    font-size: 13px;
    line-height: 16px;

    color: #212121;
    white-space: nowrap;
}

/* ===== 비로그인: 버튼 영역 ===== */
.drawer-login-area {
    padding: 20px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    font-size: 16px;
    line-height: 22px;

    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
}
.drawer-btn-navy {
    background: #2a3663;
    color: #fff;
    font-weight: 600;
}
.drawer-btn-outline {
    background: #fff;
    color: #212121;
    font-weight: 400;
    border: 1px solid #eee;
}

/* ===== 구분선 ===== */
.drawer-divider {
    height: 1px;
    background: #eee;
    margin: 14px 0;
}

/* ===== 메뉴 ===== */
.drawer-nav {
    padding: 0 20px;
}

.drawer-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 56px;
    margin-top:8px;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: -0.042px;
    color: #212121;
    text-decoration: none;
}
.drawer-menu-item img,
.drawer-menu-item svg {
    flex-shrink: 0;
    display: block;
}
.drawer-menu-item:active {
    opacity: 0.6;
}
.drawer-menu-item:first-child{
    margin-top:0;
}

    /* 마지막 nav 아래 여백 */
.drawer-nav:last-child {
    padding-bottom: 30px;
}
