@charset "UTF-8";

/* ============================================================
   현장기록 전용 스타일 — recordList.css
============================================================ */

:root {
    --bg-surface: #FFFFFF;
    --border-color: rgba(76,128,241,0.15);
    --border-hov: rgba(76,128,241,0.35);
    --blue-dim: rgba(76,128,241,0.10);
    --shadow-xl: 0 20px 60px rgba(15, 23, 42, 0.22);
}

.record-wrap { padding: 40px 24px 120px; max-width: 1200px; margin: 0 auto; }

/* ── 1. Search Bar ─────────────────────────────────────────── */
.search-container { max-width: 720px; margin: 0 auto 20px; }
.smart-search-bar {
    display: flex; align-items: center; background: var(--bg-white);
    border: 1.5px solid var(--border); border-radius: var(--r-full);
    padding: 6px; box-shadow: var(--shadow-sm);
    transition: border-color var(--ease), box-shadow var(--ease);
}
.smart-search-bar:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(76,128,241,0.12); }
.smart-kw-wrap { position: relative; flex: 1; display: flex; align-items: center; }
.smart-kw-wrap i { position: absolute; left: 20px; color: var(--muted); font-size: 0.95rem; pointer-events: none; }
.smart-search-input { width: 100%; border: none; background: transparent; outline: none; padding: 11px 16px 11px 48px; font-family: inherit; font-size: 0.95rem; color: var(--text); }
.smart-search-input::placeholder { color: var(--muted); }
.smart-search-btn { border-radius: var(--r-full); padding: 11px 26px; flex-shrink: 0; border: none; background: var(--blue); color: #fff; font-family: inherit; font-size: 0.9rem; font-weight: 700; display: flex; align-items: center; gap: 6px; transition: background var(--ease); cursor: pointer; }
.smart-search-btn:hover { background: var(--blue-acc); }

/* ── 2. Project Filter Chips ──────────────────────────────── */
.project-filter-wrap {
    display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 0 auto 40px; max-width: 960px;
}
.filter-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: var(--r-full);
    border: 1.5px solid var(--border); background: var(--bg-white); color: var(--text-sub);
    font-size: 0.85rem; font-weight: 700; text-decoration: none; transition: all var(--ease);
    box-shadow: var(--shadow-sm); cursor: pointer; user-select: none;
}
.filter-chip i { font-size: 0.85rem; opacity: 0.8; }
.filter-chip:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); transform: translateY(-2px); }
.filter-chip.active { background: var(--blue); border-color: var(--blue); color: #FFFFFF; box-shadow: 0 4px 14px rgba(76,128,241,0.30); }
.filter-chip.active i { color: #FFFFFF; opacity: 1; }

/* ── 3. Toolbar ───────────────────────────────────────────── */
.record-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.record-count { font-size: 0.88rem; color: var(--text-sub); }
.record-count strong { color: var(--blue); font-weight: 700; }

.btn-new-record { display: inline-flex; align-items: center; gap: 7px; padding: 10px 22px; border-radius: var(--r-full); border: none; background: var(--blue); color: #fff; font-size: 0.88rem; font-weight: 700; letter-spacing: -0.01em; box-shadow: 0 4px 14px rgba(76,128,241,0.30); cursor: pointer; transition: background var(--ease), transform var(--ease), box-shadow var(--ease); }
.btn-new-record:hover { background: var(--blue-acc); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(76,128,241,0.40); }
.btn-new-record:active { transform: translateY(0); }

/* ── 4. Card Grid ─────────────────────────────────────────── */
.record-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.record-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), box-shadow 0.25s cubic-bezier(0.22,1,0.36,1), border-color 0.22s ease; }
.record-card:hover { transform: translateY(-6px); box-shadow: 0 16px 36px rgba(76,128,241,0.10); border-color: rgba(76,128,241,0.25); }
.record-card-link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.rc-thumb { position: relative; width: 100%; aspect-ratio: 3/2; overflow: hidden; flex-shrink: 0; background: var(--bg); }
.rc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-body { padding: 20px 22px 18px; display: flex; flex-direction: column; flex: 1; gap: 14px; }
.rc-title { font-size: 0.98rem; font-weight: 700; color: var(--text); line-height: 1.52; margin: 0; word-break: keep-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: calc(0.98rem * 1.52 * 2); }
.rc-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.rc-date { font-size: 0.76rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.rc-date i { font-size: 0.72rem; color: var(--blue); }
.rc-arrow { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: var(--bg); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.78rem; transition: background 0.22s, border-color 0.22s, color 0.22s, transform 0.22s; }
.record-card:hover .rc-arrow { background: var(--blue); border-color: var(--blue); color: #fff; transform: translateX(3px); }

/* Empty State */
.record-empty-wrap {
    grid-column: 1 / -1; padding: 80px 20px; text-align: center; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.record-empty-icon { font-size: 3.2rem; color: var(--muted); opacity: 0.4; margin-bottom: 14px; }
.record-empty-title { font-size: 1.08rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.record-empty-desc { font-size: 0.88rem; color: var(--muted); }

/* ── 5. Modal Base & Password Modal ───────────────────────── */
.rec-modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(28,35,49,0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity 0.22s ease; }
.rec-modal-overlay.show { display: flex; opacity: 1; }
@keyframes modal-in { from { opacity:0; transform: scale(0.94) translateY(10px); } to { opacity:1; transform: scale(1) translateY(0); } }

.pw-modal { background: var(--bg-white); border-radius: var(--r-xl); padding: 44px 40px 36px; width: 100%; max-width: 420px; box-shadow: var(--shadow-xl); position: relative; animation: modal-in 0.22s cubic-bezier(0.22,1,0.36,1); }
.pw-modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; width: 34px; height: 34px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1rem; cursor: pointer; transition: background var(--ease), color var(--ease); }
.pw-modal-close:hover { background: var(--bg); color: var(--text); }
.pw-modal-icon { width: 52px; height: 52px; border-radius: var(--r-lg); margin-bottom: 20px; background: var(--blue-dim); display: flex; align-items: center; justify-content: center; color: var(--blue); font-size: 1.4rem; }
.pw-modal h2 { font-size: 1.18rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.pw-modal-desc { font-size: 0.88rem; color: var(--text-sub); line-height: 1.72; margin-bottom: 24px; }
.pw-field { width: 100%; padding: 13px 16px; margin-bottom: 6px; border: 1.5px solid var(--border); border-radius: var(--r-md); font-family: inherit; font-size: 0.95rem; color: var(--text); outline: none; background: var(--bg-white); transition: border-color var(--ease), box-shadow var(--ease); }
.pw-field:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(76,128,241,0.12); }
.pw-field.err { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(239,68,68,0.10); }
.pw-err-msg { font-size: var(--fs-xs); color: var(--danger); margin-bottom: 18px; min-height: 18px; display: flex; align-items: center; gap: 5px; }

.pw-actions { display: flex; gap: 10px; align-items: center; }
.btn-pw-cancel {
    flex: 1; height: 48px; padding: 0 16px; border-radius: var(--r-full);
    font-family: inherit; font-size: 0.92rem; font-weight: 700; background: var(--bg);
    border: 1.5px solid var(--border); color: var(--text-sub); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; transition: all var(--ease); box-sizing: border-box;
}
.btn-pw-cancel:hover { background: var(--surface); border-color: var(--border-hov); color: var(--text); }

.btn-pw-confirm {
    flex: 1.5; height: 48px; padding: 0 16px; border-radius: var(--r-full);
    font-family: inherit; font-size: 0.92rem; font-weight: 700; background: var(--blue);
    color: #fff; border: none; box-shadow: 0 4px 14px rgba(76,128,241,0.30); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; transition: background var(--ease); box-sizing: border-box;
}
.btn-pw-confirm:hover { background: var(--blue-acc); }

/* ── 6. Write Modal ───────────────────────────────────────── */
.write-modal {
    background: var(--bg-white); border-radius: 20px; width: 95vw; max-width: 620px; max-height: 88vh;
    display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(28,35,49,0.24);
    animation: modal-in 0.2s cubic-bezier(0.22,1,0.36,1);
    position: relative;
}

.wm-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; border-radius: 20px 20px 0 0; }

.wm-topbar {
    display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px;
    flex-shrink: 0; position: sticky; top: 0; z-index: 30; background: var(--bg-white);
}
.wm-close { background: none; border: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text); font-size: 1rem; cursor: pointer; transition: background var(--ease); }
.wm-close:hover { background: var(--bg); }
.wm-draft-tag { font-size: 0.86rem; font-weight: 800; color: var(--text); }
.wm-topbar-spacer { width: 34px; flex-shrink: 0; }

.wm-body { padding: 4px 20px 0; }
.wm-composer { display: flex; gap: 13px; }

.wm-avatar {
    width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 800; margin-top: 2px;
}

.wm-composer-main { flex: 1; min-width: 0; }

/* Meta row */
.wm-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

.wm-pill-pw {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1.5px solid var(--border); background: var(--bg);
    border-radius: var(--r-full); padding: 5px 13px; height: 34px;
    transition: border-color var(--ease), background-color var(--ease);
    box-sizing: border-box;
    cursor: pointer;
}
.wm-pill-pw:focus-within { border-color: var(--blue); background: var(--blue-dim); }
.wm-pill-pw i { font-size: 0.78rem; color: var(--muted); }
.wm-pill-pw input {
    width: 62px; border: none; background: transparent; outline: none;
    font-family: inherit; font-size: 0.8rem; font-weight: 800; color: var(--blue-acc); letter-spacing: 0.08em;
}
.wm-pill-pw input::placeholder { color: var(--muted); font-weight: 500; letter-spacing: normal; }

/* Inline Search Combobox */
.wm-combobox-wrap { position: relative; display: inline-block; }

.wm-combobox-pill {
    display: inline-flex; align-items: center; gap: 6px; height: 34px;
    padding: 0 28px 0 14px; border-radius: 999px; border: 1.5px solid var(--border);
    background: var(--bg); transition: all var(--ease); box-sizing: border-box;
    cursor: pointer; position: relative; user-select: none;
}
.wm-combobox-pill:hover, .wm-combobox-wrap.open .wm-combobox-pill {
    border-color: var(--blue); background: var(--blue-dim);
}

.wm-combobox-input {
    border: none; background: transparent; outline: none; font-family: inherit;
    font-size: 0.8rem; font-weight: 700; color: var(--blue-acc); cursor: pointer;
    width: 80px; min-width: 60px; box-sizing: content-box;
}
.wm-combobox-input::placeholder { color: var(--blue-acc); opacity: 0.8; }

.wm-combobox-arrow {
    position: absolute; right: 12px; font-size: 0.7rem; color: var(--blue-acc);
    pointer-events: none; transition: transform 0.2s ease;
}
.wm-combobox-wrap.open .wm-combobox-arrow { transform: rotate(180deg); }

.wm-combobox-dropdown {
    display: none; position: fixed; min-width: 220px; max-width: 360px; max-height: 240px;
    overflow-y: auto; background: #FFFFFF; border: 1.5px solid var(--border); border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22); z-index: 2000; padding: 6px;
    box-sizing: border-box; scrollbar-width: none;
}
.wm-combobox-dropdown::-webkit-scrollbar { display: none; }

.wm-combobox-option {
    padding: 9px 12px; font-size: 0.82rem; font-weight: 700; color: var(--text);
    border-radius: 10px; cursor: pointer; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; transition: background var(--ease);
}
.wm-combobox-option:hover, .wm-combobox-option.selected {
    background: var(--blue-dim); color: var(--blue-acc);
}
.wm-combobox-empty { padding: 12px; font-size: 0.8rem; color: var(--muted); text-align: center; }

/* Title Input */
.wm-title-input {
    width: 100%; border: none; outline: none; background: transparent;
    font-family: inherit; font-size: 1.2rem; font-weight: 800; color: var(--text);
    padding: 2px 0 8px; margin-bottom: 8px;
}
.wm-title-input::placeholder { color: var(--muted); font-weight: 700; }

/* ── 7. Image Preview Section ─────────────────────────────── */
.wm-preview-section { display: none; margin: 4px 0 16px; }

.wm-preview-main {
    width: 100%; aspect-ratio: 16 / 9; background: rgba(15, 23, 42, 0.05);
    border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
    position: relative; margin-bottom: 10px;
}
.wm-preview-main img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Cover Toggle Button (대표 이미지 설정 버튼) */
.wm-cover-toggle-btn {
    position: absolute; top: 14px; left: 14px; z-index: 10;
    display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px;
    border-radius: 999px; font-size: 0.78rem; font-weight: 700; font-family: inherit;
    cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(28, 35, 49, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    color: #FFFFFF; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); user-select: none;
}
.wm-cover-toggle-btn i { font-size: 0.85rem; color: #FFD233; }
.wm-cover-toggle-btn:hover {
    transform: translateY(-1px); background: rgba(28, 35, 49, 0.8);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.3);
}
.wm-cover-toggle-btn.is-cover {
    background: var(--blue); border-color: rgba(255, 255, 255, 0.6);
    color: #FFFFFF; box-shadow: 0 4px 16px rgba(76, 128, 241, 0.45);
}
.wm-cover-toggle-btn.is-cover i { color: #FFFFFF; }

/* Thumb Strip */
.wm-thumb-strip {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    background: rgba(76, 128, 241, 0.06); border: 1px solid rgba(76, 128, 241, 0.14); border-radius: 14px;
}

.wm-nav-btn {
    width: 32px; height: 32px; border-radius: 50%; background: #FFFFFF;
    border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; color: var(--text-sub); cursor: pointer; flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(76, 128, 241, 0.08); transition: all var(--ease);
}
.wm-nav-btn:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }
.wm-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.wm-thumbs {
    display: flex; align-items: center; gap: 8px; overflow-x: auto; flex: 1;
    scroll-behavior: smooth; scrollbar-width: none; padding: 2px 0;
}
.wm-thumbs::-webkit-scrollbar { display: none; }

.wm-thumb {
    position: relative; width: 48px; height: 48px; border-radius: 10px;
    overflow: hidden; flex-shrink: 0; cursor: grab; border: 2px solid transparent;
    background: rgba(138, 148, 166, 0.2); transition: border-color var(--ease), transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}
.wm-thumb:active { cursor: grabbing; }
.wm-thumb.on { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(76,128,241,0.25); }

/* 썸네일 하단에 딱 붙는 미니 캡슐 라벨 */
.wm-thumb-cover-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    padding: 2px 0;
    background: rgba(76, 128, 241, 0.9); /* 브랜드 블루 반투명 */
    color: #FFFFFF;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
    line-height: 1.2;
    pointer-events: none;
}

.wm-thumb-chosen { transform: scale(1.08); box-shadow: 0 8px 18px rgba(76, 128, 241, 0.3); z-index: 10; }
.wm-thumb-ghost { opacity: 0.35; background: var(--blue-dim) !important; border: 2px dashed var(--blue) !important; }
.wm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

.wm-thumb-del {
    position: absolute; top: 3px; right: 3px; z-index: 5; width: 16px; height: 16px;
    border-radius: 50%; border: none; background: rgba(15, 23, 42, 0.75); color: #fff;
    font-size: 0.65rem; font-weight: 700; line-height: 1; display: flex; align-items: center;
    justify-content: center; cursor: pointer; transition: background var(--ease);
}
.wm-thumb-del:hover { background: var(--danger); }

.wm-thumb-add {
    width: 48px; height: 48px; border-radius: 10px; border: 1.5px dashed var(--border);
    background: var(--bg-white); color: var(--muted); font-size: 1.2rem; font-weight: 300;
    display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: all var(--ease);
}
.wm-thumb-add:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }

/* Textarea Content */
.wm-content-textarea {
    width: 100%; min-height: 110px; border: none; outline: none; resize: none;
    background: transparent; font-family: inherit; font-size: 1.02rem; color: var(--text);
    line-height: 1.7; padding: 0 0 6px; overflow-y: hidden;
}
.wm-content-textarea::placeholder { color: var(--muted); font-weight: 400; }
.wm-bottom-space { height: 4px; flex-shrink: 0; }

/* Modal Footer */
.wm-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 20px 16px; border-top: 1px solid var(--border); flex-shrink: 0;
    position: sticky; bottom: 0; background: var(--bg-white); z-index: 30;
    border-radius: 0 0 20px 20px;
}
.wm-tool-icons { display: flex; align-items: center; gap: 2px; }
.wm-tool-btn {
    width: 38px; height: 38px; border-radius: 50%; border: none; background: none;
    display: flex; align-items: center; justify-content: center; color: var(--blue); font-size: 1.05rem; cursor: pointer; transition: background var(--ease); position: relative;
}
.wm-tool-btn:hover { background: var(--blue-dim); }
.wm-tool-badge {
    position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px;
    background: var(--blue); color: #fff; font-size: 0.6rem; font-weight: 800; display: none; align-items: center; justify-content: center; border: 1.5px solid var(--bg-white);
}
.wm-footer-right { display: flex; align-items: center; gap: 12px; }

.btn-post {
    padding: 10px 24px; border: none; border-radius: var(--r-full); background: var(--blue); color: #fff;
    font-family: inherit; font-size: 0.9rem; font-weight: 800; cursor: pointer; transition: background var(--ease), transform var(--ease); white-space: nowrap;
}
.btn-post:hover { background: var(--blue-acc); }
.btn-post:active { transform: scale(0.97); }

/* ── 8. Gemini Style Modern Tooltip ───────────────────────── */
.cw-tooltip {
    position: fixed; z-index: 9999; padding: 6px 12px; font-size: 0.75rem; font-weight: 600;
    color: #FFFFFF; background: rgba(28, 35, 49, 0.88); backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2); pointer-events: none;
    opacity: 0; transform: translateY(4px) scale(0.96);
    transition: opacity 0.15s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}
.cw-tooltip.show { opacity: 1; transform: translateY(0) scale(1); }

/* ── 9. Responsive ────────────────────────────────────────── */
@media(max-width:960px){ .record-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:640px){
    .record-wrap { padding: 32px 20px 80px; }
    .record-grid { grid-template-columns: 1fr; gap: 18px; }
    .wm-body { padding: 4px 16px 0; }
    .wm-footer { padding: 10px 16px 14px; }
    .project-filter-wrap { gap: 6px; }
    .filter-chip { padding: 7px 14px; font-size: 0.8rem; }
}