/* ===================================
   웨딩 테마 모바일 전용 CSS
   wedding-mobile.css
   
   991px 이하에서만 적용되는 모바일 스타일
   PC 디자인과 완전 독립적
   =================================== */

/* 모바일/태블릿에서만 적용 */
@media (max-width: 991px) {
    
    /* ===================================
       모바일에서 active 메뉴의 서브메뉴 자동 표시
       =================================== */
    .nav-link.active + .submenu,
    .nav-link.active ~ .submenu {
        display: block !important;
        height: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Bootstrap collapse 클래스 오버라이드 */
    .nav-link.active + .submenu.collapse,
    .nav-link.active ~ .submenu.collapse {
        display: block !important;
    }
    
    /* ===================================
       기존 PC 요소 숨김
       =================================== */
    .sidebar-left,
    .sidebar.sidebar-left,
    .sidebar-right,
    #sidebarRight,
    .floating-actions,
    .sidebar-toggle-btn {
        display: none !important;
    }
    
    /* ===================================
       모바일 헤더
       =================================== */
    .mobile-header {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1100;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
    }
    
    .mobile-header .logo {
        display: flex;
        align-items: center;
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--rose-gold);
    }
    
    .mobile-header .logo i {
        margin-right: 0.5rem;
        font-size: 1.5rem;
    }
    
    .mobile-header-actions {
        display: flex;
        gap: 0.5rem;
    }
    
    .mobile-header-btn {
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        color: #333;
        cursor: pointer;
        border-radius: 50%;
        transition: background 0.2s;
    }
    
    .mobile-header-btn:active {
        background: #f0f0f0;
    }
    
    /* ===================================
       모바일 네비게이션 드로어
       =================================== */
    .mobile-nav-drawer {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: white;
        z-index: 1200;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
    }
    
    .mobile-nav-drawer.open {
        left: 0;
    }
    
    .mobile-nav-header {
        padding: 1.5rem;
        background: linear-gradient(135deg, var(--rose-gold) 0%, #e8b4b8 100%);
        color: white;
    }
    
    .mobile-nav-header .user-info {
        display: flex;
        align-items: center;
        margin-bottom: 1rem;
    }
    
    .mobile-nav-header .user-avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 1rem;
    }
    
    .mobile-nav-header .user-avatar i {
        font-size: 1.5rem;
        color: var(--rose-gold);
    }
    
    .mobile-nav-header .user-name {
        font-size: 1.125rem;
        font-weight: 600;
    }
    
    .mobile-nav-header .user-status {
        font-size: 0.875rem;
        opacity: 0.9;
    }
    
    /* 모바일 메뉴 리스트 */
    .mobile-nav-menu {
        padding: 0;
        margin: 0;
        list-style: none;
    }
    
    .mobile-nav-item {
        border-bottom: 1px solid #f5f5f5;
    }
    
    .mobile-nav-link {
        display: flex;
        align-items: center;
        padding: 1rem 1.25rem;
        color: #333;
        text-decoration: none;
        font-size: 0.95rem;
        transition: background 0.2s;
    }
    
    .mobile-nav-link:active {
        background: #f8f9fa;
    }
    
    .mobile-nav-link i {
        font-size: 1.25rem;
        margin-right: 1rem;
        color: var(--rose-gold);
        width: 24px;
        text-align: center;
    }
    
    /* 모바일 서브메뉴 화살표 */
    .mobile-nav-link .submenu-arrow {
        margin-left: auto;
        font-size: 0.875rem;
        transition: transform 0.3s;
        color: #999;
    }
    
    .mobile-nav-item.expanded .submenu-arrow {
        transform: rotate(180deg);
    }
    
    /* 모바일 서브메뉴 */
    .mobile-submenu {
        display: none;
        list-style: none;
        padding: 0;
        margin: 0;
        background: #f8f9fa;
    }
    
    .mobile-nav-item.expanded .mobile-submenu,
    .mobile-nav-link.active + .mobile-submenu {
        display: block;
    }
    
    .mobile-submenu-link {
        display: block;
        padding: 0.75rem 1rem 0.75rem 3.5rem;
        color: #666;
        text-decoration: none;
        font-size: 0.875rem;
        transition: background 0.2s;
    }
    
    .mobile-submenu-link:active,
    .mobile-submenu-link.active {
        background: #e9ecef;
        color: var(--rose-gold);
    }
    
    .mobile-nav-link .badge {
        margin-left: 0.5rem;
        background: var(--rose-gold);
        color: white;
        padding: 0.125rem 0.5rem;
        border-radius: 12px;
        font-size: 0.75rem;
    }
    
    /* ===================================
       하단 고정 네비게이션
       =================================== */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1100;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 0 0.5rem;
    }
    
    .mobile-bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        color: #999;
        text-decoration: none;
        transition: color 0.2s;
        position: relative;
    }
    
    .mobile-bottom-nav-item.active {
        color: var(--rose-gold);
    }
    
    .mobile-bottom-nav-item i {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    .mobile-bottom-nav-item span {
        font-size: 0.625rem;
        font-weight: 500;
    }
    
    .mobile-bottom-nav-item .notification-dot {
        position: absolute;
        top: 8px;
        right: calc(50% - 12px);
        width: 6px;
        height: 6px;
        background: #ff4444;
        border-radius: 50%;
    }
    
    /* ===================================
       플로팅 액션 버튼
       =================================== */
    .mobile-fab {
        position: fixed;
        bottom: 70px;
        right: 1rem;
        width: 56px;
        height: 56px;
        background: linear-gradient(135deg, var(--rose-gold) 0%, #d4a0a4 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 15px rgba(232, 180, 184, 0.4);
        z-index: 1000;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
    }
    
    .mobile-fab:active {
        transform: scale(0.95);
    }
    
    .mobile-fab i {
        font-size: 1.5rem;
        color: white;
    }
    
    /* ===================================
       메인 컨텐츠 조정
       =================================== */
    .main-content {
        margin: 0;
        padding: 72px 1rem;
        min-height: 100vh;
    }
    
    /* ===================================
       오버레이
       =================================== */
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1150;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
    }
    
    .mobile-nav-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    /* ===================================
       빠른 예약 모달 (바텀 시트)
       =================================== */
    .mobile-quick-modal {
        position: fixed;
        bottom: -100%;
        left: 0;
        right: 0;
        background: white;
        border-radius: 20px 20px 0 0;
        z-index: 1300;
        transition: bottom 0.3s ease;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .mobile-quick-modal.show {
        bottom: 0;
    }
    
    .mobile-quick-modal-header {
        padding: 1rem;
        border-bottom: 1px solid #e9ecef;
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        background: white;
        z-index: 1;
    }
    
    .mobile-quick-modal-title {
        font-size: 1.125rem;
        font-weight: 600;
        color: #333;
    }
    
    .mobile-quick-modal-close {
        width: 32px;
        height: 32px;
        border: none;
        background: #f8f9fa;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    
    .mobile-quick-modal-body {
        padding: 1.5rem 1rem;
    }
}

/* ===================================
   태블릿 특별 조정 (768px - 991px)
   =================================== */
@media (min-width: 768px) and (max-width: 991px) {
    .mobile-nav-drawer {
        max-width: 380px;
    }
    
    .main-content {
        padding: 72px 2rem;
    }
    
    .mobile-header {
        padding: 0 2rem;
    }
}

/* ===================================
   작은 모바일 (576px 이하)
   =================================== */
@media (max-width: 576px) {
    .mobile-header {
        height: 50px;
    }
    
    .mobile-header .logo {
        font-size: 1.125rem;
    }
    
    .mobile-header-btn {
        width: 36px;
        height: 36px;
    }
    
    .mobile-bottom-nav {
        height: 50px;
    }
    
    .mobile-bottom-nav-item i {
        font-size: 1.125rem;
    }
    
    .mobile-bottom-nav-item span {
        font-size: 0.5625rem;
    }
    
    .main-content {
        padding: 60px 0.75rem;
    }
    
    .mobile-fab {
        width: 50px;
        height: 50px;
        bottom: 60px;
    }
}

/* ===================================
   아주 작은 모바일 (375px 이하)
   =================================== */
@media (max-width: 375px) {
    .mobile-header {
        padding: 0 0.75rem;
    }
    
    .mobile-header .logo {
        font-size: 1rem;
    }
    
    .mobile-header .logo i {
        font-size: 1.25rem;
    }
    
    .mobile-nav-drawer {
        width: 90%;
    }
    
    .mobile-fab {
        width: 48px;
        height: 48px;
        right: 0.75rem;
    }
}

/* ===================================
   가로 모드 대응
   =================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-header {
        height: 48px;
    }
    
    .mobile-bottom-nav {
        height: 48px;
    }
    
    .main-content {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    .mobile-nav-header {
        padding: 1rem;
    }
    
    .mobile-nav-link {
        padding: 0.75rem 1rem;
    }
}

/* ===================================
   iOS Safe Area 대응
   =================================== */
@supports (padding: max(0px)) {
    @media (max-width: 991px) {
        .mobile-header {
            padding-top: max(0px, env(safe-area-inset-top));
            height: calc(56px + env(safe-area-inset-top));
        }
        
        .mobile-bottom-nav {
            padding-bottom: max(0px, env(safe-area-inset-bottom));
            height: calc(56px + env(safe-area-inset-bottom));
        }
        
        .main-content {
            padding-top: calc(72px + env(safe-area-inset-top));
            padding-bottom: calc(72px + env(safe-area-inset-bottom));
        }
        
        .mobile-fab {
            bottom: calc(70px + env(safe-area-inset-bottom));
        }
    }
}

/* ===================================
   PC에서는 모바일 요소 완전 숨김
   =================================== */
@media (min-width: 992px) {
    .mobile-header,
    .mobile-nav-drawer,
    .mobile-bottom-nav,
    .mobile-fab,
    .mobile-nav-overlay,
    .mobile-quick-modal {
        display: none !important;
    }
}