/* ============================================
   🎯 플로팅 사이드바 버튼 (1280px 미만)
   ============================================ */

/* 1280px 이상에서는 숨김 */
@media (min-width: 1280px) {
    .floating-sidebar-btn {
        display: none !important;
    }
}

/* 1280px 미만에서만 표시 */
@media (max-width: 1279px) {
    .floating-sidebar-btn {
        position: fixed;
        bottom: 80px;  /* 하단 네비게이션 위 */
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--premium-primary-600, #0D9488) 0%, var(--premium-primary-700, #0F766E) 100%);
        color: white;
        border: none;
        box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
        cursor: pointer;
        z-index: 100;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 24px;
    }
    
    .floating-sidebar-btn:hover {
        transform: translateY(-4px) scale(1.05);
        box-shadow: 0 8px 20px rgba(13, 148, 136, 0.5), 0 4px 8px rgba(0, 0, 0, 0.15);
    }
    
    .floating-sidebar-btn:active {
        transform: translateY(-2px) scale(1.02);
    }
    
    /* 버튼 애니메이션 */
    @keyframes pulse {
        0%, 100% {
            box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        50% {
            box-shadow: 0 4px 12px rgba(13, 148, 136, 0.6), 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 0 8px rgba(13, 148, 136, 0.1);
        }
    }
    
    .floating-sidebar-btn.pulse {
        animation: pulse 2s infinite;
    }
}

/* ============================================
   🎯 모바일 사이드바 오버레이 (1280px 미만)
   ============================================ */
@media (max-width: 1279px) {
    /* 오버레이 배경 */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 200;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        backdrop-filter: blur(2px);
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* 슬라이드 사이드바 */
    .mobile-sidebar-panel {
        position: fixed;
        top: var(--premium-header-height, 60px);
        right: -400px;  /* 초기 위치: 화면 밖 */
        bottom: var(--premium-bottom-nav-height, 64px);
        width: 90%;
        max-width: 400px;
        background: white;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        z-index: 201;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        padding: 20px;
    }
    
    .mobile-sidebar-panel.active {
        right: 0;  /* 활성화: 화면 안으로 */
    }
    
    /* 사이드바 닫기 버튼 */
    .mobile-sidebar-close {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: var(--premium-gray-100, #F5F5F4);
        border: none;
        color: var(--premium-gray-700, #44403C);
        font-size: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        z-index: 10;
    }
    
    .mobile-sidebar-close:hover {
        background: var(--premium-gray-200, #E7E5E4);
        transform: scale(1.1);
    }
    
    .mobile-sidebar-close:active {
        transform: scale(0.95);
    }
}

/* ============================================
   🎯 모바일에서 기존 사이드바 숨김
   ============================================ */
@media (max-width: 1279px) {
    /* 기존 고정 사이드바 완전 숨김 */
    .work-sidebar-area,
    .page-sidebar,
    .calendar-sidebar {
        display: none !important;
    }
}
