/* ==========================================================================
   2026-01-23 [Sprint 10] Wynlo Sidebar CSS
   --------------------------------------------------------------------------
   Goal:
   - ChatGPT-like thin rail sidebar + clean tooltips
   - Keep tooltip visible outside sidebar rail (no clipping)
   - Brand tone: #44474A (Wynlo brand)
   --------------------------------------------------------------------------
   Notes:
   1) Collapsed sidebar width is w-11 (2.75rem) handled by base.html classes
   2) Tooltip must escape sidebar => parent aside must NOT be overflow-hidden
   3) Expanded top area: full logo left-aligned (requested)
   --------------------------------------------------------------------------
   IMPORTANT (2026-01-27 [Sprint 10]):
   - Auth + App share the same head fragment now.
   - Token-based theming exists in foundation.css.
   - This file should remain "app layout / sidebar behavior" focused.
   ========================================================================== */

/* =========================
   0) CSS Variables (Sidebar-only)
   --------------------------------------------------------------------------
   These are intentionally sidebar-specific.
   Global theme tokens should live in foundation.css.
   ========================= */
:root {
    /* Wynlo brand (sidebar) */
    --wynlo-brand: #44474A;

    /* Muted text tone (ChatGPT-ish: lighter but readable) */
    --wynlo-muted: rgba(68, 71, 74, 0.60);
    --wynlo-muted-strong: rgba(68, 71, 74, 0.72);
    --wynlo-sep: rgba(68, 71, 74, 0.30);

    /* Tooltip style */
    --wynlo-tooltip-bg: rgba(17, 24, 39, 0.92);
}

/* =========================
   1) Header breadcrumb tuning (if used)
   - "Wynlo / Page" style: thicker + lighter
   ========================= */
.wynlo-page-title { color: var(--wynlo-brand); }

/* "Wynlo" in breadcrumb */
.wynlo-breadcrumb-root {
    color: var(--wynlo-muted);
    font-weight: 700;
    letter-spacing: 0.15px;
}

/* "/" separator */
.wynlo-breadcrumb-sep { color: var(--wynlo-sep); }

/* =========================
   2) Sidebar "thin rail" feeling
   - Reduce padding & icon size
   - The actual width is controlled by Tailwind classes on the wrapper.
   ========================= */
.sidebar-thin nav {
    padding: 0.25rem;
}

.sidebar-thin .sidebar-link {
    gap: 0.5rem;
    padding: 0.48rem 0.45rem;
    border-radius: 12px;
}

.sidebar-thin .sidebar-icon {
    width: 17px;
    height: 17px;
}

/* =========================
   3) Top brand toggle button
   - Collapsed: centered symbol
   - Expanded: left-aligned full logo
   ========================= */
.sidebar-brand-btn {
    width: 100%;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 10px 0;
    background: transparent;
    transition: background 120ms ease;
}

.sidebar-brand-btn:hover {
    background: rgba(0,0,0,0.03);
}

.sidebar-logo-symbol-size {
    width: 34px;
    height: 34px;
}

.sidebar-logo-full-size {
    height: 24px;
}

.sidebar-logo-full {
    margin-left: 6px;
}

#sidebarDesktopWrap:not(.sidebar-collapsed) .sidebar-brand-btn {
    justify-content: flex-start !important;
    padding-left: 12px;
    padding-right: 12px;
}

#sidebarDesktopWrap.sidebar-collapsed .sidebar-brand-btn {
    justify-content: center !important;
    padding-left: 0;
    padding-right: 0;
}

/* =========================
   4) Icon coloring for SVG <img> using filter
   - Brand-ish tone via CSS filter (works with monochrome svg/img)
   ========================= */
.sidebar-icon {
    filter: invert(27%) sepia(6%) saturate(350%) hue-rotate(180deg) brightness(92%) contrast(90%);
    transition: transform 120ms ease, filter 120ms ease;
}

.sidebar-link:hover .sidebar-icon {
    filter: invert(22%) sepia(8%) saturate(420%) hue-rotate(180deg) brightness(85%) contrast(95%);
    transform: translateY(-0.5px);
}

/* =========================
   4.1) Active state icon tone
   --------------------------------------------------------------------------
   Legacy support:
   - Previously, active link used Tailwind class bg-gray-100.
   - This selector depends on that specific class.
   New recommended approach:
   - Use .is-active class on the link (stable across themes).
   --------------------------------------------------------------------------
   ✅ For now, support BOTH to avoid breaking existing pages.
   ========================= */

/* Legacy active: keep for backward compatibility */
.sidebar-link.bg-gray-100 .sidebar-icon {
    filter: invert(18%) sepia(10%) saturate(520%) hue-rotate(180deg) brightness(78%) contrast(100%);
}

/* New active (recommended): does not depend on gray utilities */
.sidebar-link.is-active .sidebar-icon {
    filter: invert(18%) sepia(10%) saturate(520%) hue-rotate(180deg) brightness(78%) contrast(100%);
}

/* =========================
   5) Collapsed behavior
   - Hide labels, center icons
   ========================= */
.sidebar-collapsed .sidebar-label {
    display: none !important;
}

.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

/* =========================
   6) Tooltip (ChatGPT-ish)
   - Only visible when collapsed
   - Parent aside must not clip (no overflow-hidden)
   ========================= */
.sidebar-link { position: relative; }

.sidebar-tooltip {
    position: absolute;
    left: 52px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 10px;
    border-radius: 9999px;
    background: var(--wynlo-tooltip-bg);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
    z-index: 9999;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}

.sidebar-tooltip::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--wynlo-tooltip-bg);
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.sidebar-collapsed .sidebar-link:hover .sidebar-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(2px);
}

/* ==========================================================================
   2026-01-23 [Sprint 10] Mobile overlay/drawer layering
   - PC에는 영향 없게 "id 기준"으로만 제어
   - #sidebarMobileWrap/#mobileOverlay를 사용하지 않으면 무시됨
   ========================================================================== */
#sidebarMobileWrap {
    position: relative;
    z-index: 50;
}

#mobileOverlay {
    z-index: 40;
}

/* ==========================================================================
   2026-01-27 [Sprint 10] Auth notice component (token-driven)
   --------------------------------------------------------------------------
   Purpose:
   - Remove JS-side Tailwind color hard-coding for notices.
   - Keep success/error/info styling consistent and theme-ready.
   - JS toggles only:
     - .notice
     - .notice--success | .notice--error | .notice--info
   ========================================================================== */

.notice{
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 12px;
    font-size: 14px;
    background: var(--surface);
    color: var(--text);
}

/* Neutral info */
.notice--info{
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text);
}

/* Success / Error (tinted)
   - These are semantic colors. For full theming later,
     you can replace these with dedicated tokens (e.g., --success-bg). */
.notice--success{
    background: rgba(16,185,129,.10);
    border-color: rgba(16,185,129,.25);
    color: rgba(6,95,70,1);
}

.notice--error{
    background: rgba(239,68,68,.10);
    border-color: rgba(239,68,68,.25);
    color: rgba(153,27,27,1);
}

/* ==========================================================================
2026-01-27 [Sprint 10] Auth-only visual tuning (NO impact on landing)
--------------------------------------------------------------------------
문제:
- auth 배경이 너무 새하얘져서 눈부심
- auth 문구 톤이 너무 검정으로 쨍해짐 (원래는 차콜/뮤트 톤)
해결:
- auth 전용 토큰(--auth-*) 추가
- Tailwind에서 wauthbg/wauthtext/wauthmuted로 사용
========================================================================== */

/* 2026-01-27 [Sprint 10]
Optional: auth card border를 너무 새하얗게 느끼면 살짝 톤 다운 */
.auth-card{
    border-color: rgba(17,19,21,.08) !important;
}