/* ===================================================
 * @module search-tag | @vars (없음, 하드코딩 #2D4B43)
 * @pair js/search-tag.js
 * @flow Left-side fixed peek tag w/ search expand
 *
 * 사용자 자주 조정 포인트:
 *   - .vault-peek-tag top: 35% (태그 위치)
 *   - .tag-trigger width/height: 28px x 100px
 *   - .tag-trigger background: #2D4B43 다크그린
 *   - .vault-peek-tag.active: 펼침 너비 320px
 * =================================================== */

/* --- 스니펫 ID: 1699 | 홈화면 사이드 태그 - 검색창 --- */
/* 레드 태그 본체 */
.vault-peek-tag {
    position: fixed;
    left: 0;
    top: 35%; /* 위치는 취향껏 조절 */
    z-index: 10000;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.5);
    border: none;
    backface-visibility: hidden; /* 애니메이션 덜덜거림 방지 */
}

/* 눈길을 끄는 태그 버튼 */
.tag-trigger {
    width: 28px;
    height: 100px;
    background: #2D4B43;
    color: #ffffff;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    box-shadow: none;
    transition: width 0.3s ease, transform 0.25s ease, box-shadow 0.3s ease;

    /* 슬쩍 슬쩍 움직이는 애니메이션 */
    animation: peek-wiggle 10s infinite;
}

/* 확장되는 내용물 박스 */
.tag-content {
    width: 0;
    overflow: hidden;
    background: #ffffff;
    height: 100px;
    display: flex;
    align-items: center;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 8px 8px 0;
}

.vault-peek-tag.is-open .tag-content {
    width: 320px;
    padding: 0 20px;
}

/* 검색 폼 내부 스타일 */
.peek-search-form {
    display: flex;
    width: 100%;
    align-items: center;
    border-bottom: 2px solid #2D4B43;
    padding-bottom: 5px;
}

.peek-search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    font-size: 16px;
    font-weight: 500;
    background: transparent;
    padding: 10px;
    color: #333333;
}

.peek-search-submit {
    background: none;
    border: none;
    color: #2D4B43;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.peek-search-submit:hover {
    transform: scale(1.1);
}

/* ── 호버: 서랍 살짝 열림 + 글로우 ── */
.vault-peek-tag:not(.is-open):hover .tag-trigger {
    transform: translateX(4px);
    box-shadow: 3px 0 16px rgba(45, 75, 67, 0.55);
}

/* 닫힘/열림 컬러 스위칭 유지 */
.vault-peek-tag.is-open .tag-trigger {
    background: #ffffff;
    color: #2D4B43;
    animation: none;
}

/* 흔들림 애니메이션 */
@keyframes peek-wiggle {
    0%, 90%, 100% { transform: translateX(0); }
    93%           { transform: translateX(5px); }
    96%           { transform: translateX(-2px); }
    98%           { transform: translateX(3px); }
}

/* ══════════════════════════════════════════
   다크모드 오버라이드  (body.dark-theme)
   ══════════════════════════════════════════ */
html[data-color-scheme="dark"] .tag-trigger {
    background: #4a9b8a;
    color: #ffffff;
    box-shadow: none;
}

html[data-color-scheme="dark"] .tag-content {
    background: #1e2a28;
}

html[data-color-scheme="dark"] .peek-search-form {
    border-bottom-color: #4a9b8a;
}

html[data-color-scheme="dark"] .peek-search-input {
    color: #e8f0ee;
}

html[data-color-scheme="dark"] .peek-search-submit {
    color: #4a9b8a;
}

/* 다크모드 호버 글로우 */
html[data-color-scheme="dark"] .vault-peek-tag:not(.is-open):hover .tag-trigger {
    box-shadow: 3px 0 20px rgba(74, 155, 138, 0.7),
                0  0 12px rgba(74, 155, 138, 0.4);
}

/* 다크모드 열린 상태 */
html[data-color-scheme="dark"] .vault-peek-tag.is-open .tag-trigger {
    background: #1e2a28;
    color: #4a9b8a;
}
