/* ================================================
   alex-base.css — base.html 인라인 스타일 분리
   생성: 2026-05-27 (base.html 리팩토링 1단계)
   ================================================ */

/* ── 스크롤바 완전 제거 ── */
html {
    overflow: hidden !important;
    height: 100% !important;
    width: 100% !important;
}

body {
    overflow: hidden !important;
    height: 100vh !important;
    width: 100% !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

*, *::before, *::after {
    box-sizing: border-box !important;
}

body > * {
    max-width: 100% !important;
}

::-webkit-scrollbar {
    width: 0px !important;
    height: 0px !important;
    display: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none !important;
}

html {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

body {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* ── Glassmorphism 효과 ── */
.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

/* ── 맥동 버튼 효과 ── */
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.3); opacity: 0; }
}

.pulse-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #4F46E5;
    border-radius: 50%;
    z-index: -1;
    animation: pulse-ring 2s infinite;
}

/* ── 커스텀 스크롤바 (.custom-scroll) ── */
.custom-scroll::-webkit-scrollbar {
    width: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

/* ── 다크 모드 ── */
.dark .glass-panel {
    background: rgba(31, 41, 55, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.dark .custom-scroll::-webkit-scrollbar-track {
    background: #374151;
}

.dark .custom-scroll::-webkit-scrollbar-thumb {
    background: #4B5563;
}

/* ── 스크롤바 숨김 유틸리티 (.scrollbar-hide) ── */
.scrollbar-hide {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* 사이드바 스크롤바 숨김 */
#folders-container {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

#folders-container::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
}

.folder-sessions {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.folder-sessions::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
}

/* 결제 플랜 모달 스크롤바 */
#pricing-modal .bg-white {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

#pricing-modal .bg-white::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* ── 토스트 알림 애니메이션 ── */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.animate-slide-in-right {
    animation: slideInRight 0.3s ease-out forwards;
}

/* ── 배너 슬라이드 다운 ── */
@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ── 펄스 애니메이션 ── */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* ── 바운스 애니메이션 ── */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0, 0, 0); }
    40%, 43% { transform: translate3d(0, -8px, 0); }
    70% { transform: translate3d(0, -4px, 0); }
    90% { transform: translate3d(0, -2px, 0); }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* ── 모바일 전용 오버플로우 제어 ── */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
        position: relative !important;
    }

    body > div.flex {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .container,
    div[class*="container"]:not(#sidebar) {
        max-width: 100vw !important;
        width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    #sidebar {
        max-width: 16rem !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   공용 페이지 헤더 (workstation 76px glass) — 전 페이지 통일 표준
   사용:
   <header class="page-header">
     <div class="page-header-lead">
       <div class="page-header-icon"><ion-icon name="X-outline"></ion-icon></div>
       <div>
         <h1 class="page-header-title">제목 <span>강조</span></h1>
         <p class="page-header-sub">SUBTITLE</p>
       </div>
     </div>
     <div class="page-header-actions"><!-- pill 버튼/통계 --></div>
   </header>
   ───────────────────────────────────────────────────────────── */
.page-header {
    height: 76px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 50;
}
.page-header-lead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-header-icon {
    width: 36px; height: 36px; border-radius: 12px;
    background: linear-gradient(135deg,#1d1d1f,#3a3a3c);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.page-header-icon ion-icon { font-size: 18px; color: #fff; }
.page-header-title {
    font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
    color: #1d1d1f; line-height: 1.15;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.page-header-title span { color: #0066cc; }
.page-header-sub {
    font-size: 10px; font-weight: 500; color: #86868b;
    letter-spacing: 0.1em; margin-top: 3px; text-transform: uppercase;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.page-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* pill 버튼 (헤더 액션 공용) */
.pill-btn {
    padding: 8px 18px; border-radius: 9999px; font-size: 13px; font-weight: 500;
    border: none; cursor: pointer; transition: all 0.2s; text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.pill-btn-light { background: rgba(0,0,0,0.04); color: #1d1d1f; }
.pill-btn-light:hover { background: rgba(0,0,0,0.08); }
.pill-btn-primary { background: #1d1d1f; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.pill-btn-primary:hover { background: #000; }
.pill-btn-active { background: #0066cc; color: #fff; }

@media (max-width: 640px) {
    .page-header { padding: 0 16px; }
    .page-header-title { font-size: 18px; }
    .page-header-sub { display: none; }
}
