/* ============================================================
   영상 통합 검색 — 새 디자인 (사이드바 폐지 → 가로 칩 그룹)
   포인트 컬러: #e85c33
============================================================ */
body #searchApp * { font-size: 15px !important; }

/* 상단 헤더 라인 */
.vs-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 18px;
}
.vs-header h2 {
    font-size: 22px !important;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}
.vs-header-sub {
    font-size: 13px !important;
    color: #888;
}

/* ============================================================
   상단 둥근 검색바 (Google 스타일)
============================================================ */
.vs-search-bar {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 36px;
    padding: 4px 4px 4px 22px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    margin-bottom: 16px;
}

.vs-search-bar .vs-search-input {

}
.vs-search-bar:focus-within {
    border-color: #e85c33;
    box-shadow: 0 0 0 4px rgba(232, 92, 51, 0.12);
}
.vs-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px !important;
    font-family: inherit;
    padding: 14px 8px;
    color: #1a1a1a;
}
.vs-search-input::placeholder { color: #aaa; }
.vs-search-clear {
    border: none;
    background: none;
    color: #bbb;
    font-size: 18px !important;
    cursor: pointer;
    padding: 0 10px;
    line-height: 1;
}
.vs-search-clear:hover { color: #e85c33; }
.vs-search-btn {
    border: none;
    background: #e85c33;
    color: #fff;
    font-size: 14px !important;
    font-weight: 700;
    font-family: inherit;
    border-radius: 30px;
    padding: 0 28px;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.vs-search-btn:hover { background: #d04d27; }
/* 시소로스DB 검색 버튼 — 통합검색 버튼과 색상으로 구분(남색) */
.vs-search-bar .vs-thesaurus-btn {
    background: #0a3d62;
    margin-left: 6px;
}
.vs-search-bar .vs-thesaurus-btn:hover { background: #082f4d; }

/* ============================================================
   상단 칩 그룹 (정렬/재생목록/연도/지역/기관)
============================================================ */
.vs-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.vs-chip-wrap { position: relative; }
.vs-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 13px !important;
    color: #444;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.vs-chip:hover {
    border-color: #e85c33;
    color: #e85c33;
}
.vs-chip.is-active {
    background: #fff5f2;
    border-color: #e85c33;
    color: #e85c33;
    font-weight: 600;
}
.vs-chip .vs-chip-arrow {
    font-size: 9px !important;
    color: #aaa;
    transition: transform 0.15s ease;
}
.vs-chip.is-active .vs-chip-arrow { color: #e85c33; }
.vs-chip-wrap.is-open .vs-chip-arrow { transform: rotate(180deg); }

/* 칩 드롭다운 패널 */
.vs-chip-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 180px;
    width: max-content;
    max-width: 80vw;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 20;
}
.vs-chip-panel.wide { min-width: 240px; }
.vs-chip-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 13px !important;
    color: #444;
    cursor: pointer;
    font-family: inherit;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    line-height: 1.4;
    white-space: nowrap;
}
.vs-chip-option:hover { background: #fff5f2; color: #e85c33; }
.vs-chip-option.is-active {
    color: #e85c33;
    font-weight: 600;
    background: #fff9f7;
}
.vs-chip-option-check {
    color: #e85c33;
    font-size: 12px !important;
    margin-left: 8px;
    visibility: hidden;
}
.vs-chip-option.is-active .vs-chip-option-check { visibility: visible; }

/* 체크박스 칩 패널 */
.vs-chip-panel-checks {
    min-width: 220px;
    width: max-content;
    max-width: 80vw;
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 12px 12px;
}
.vs-chip-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    font-size: 13px !important;
    color: #333;
}
.vs-chip-check span { white-space: nowrap; }
.vs-chip-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0a3d62;
    cursor: pointer;
    flex-shrink: 0;
}
.vs-chip-panel-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid #eee;
    margin-top: 8px;
    padding-top: 10px;
}
.vs-chip-action {
    padding: 6px 14px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px !important;
    color: #555;
}
.vs-chip-action.is-primary {
    background: #0a3d62;
    color: #fff;
    border-color: #0a3d62;
}

/* 활성 필터 태그 (오렌지 라운드 칩) */
.vs-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.vs-filter-tag {
    display: inline-flex;
    align-items: center;
    background: #e85c33;
    color: #fff;
    border-radius: 18px;
    padding: 4px 10px 4px 14px;
    font-size: 12px !important;
    line-height: 1.4;
}
.vs-filter-tag-remove {
    margin-left: 8px;
    cursor: pointer;
    color: #fff;
    font-size: 14px !important;
    line-height: 1;
    border: none;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.vs-filter-tag-remove:hover { background: rgba(255, 255, 255, 0.32); }
/* 시소로스 적용 용어 칩 — 다른 필터 칩과 색상으로 구분(남색) */
.vs-filter-tag.is-thesaurus { background: #0a3d62; }
.vs-filter-clear-all {
    background: none;
    border: none;
    color: #888;
    font-size: 12px !important;
    cursor: pointer;
    text-decoration: underline;
    padding: 0 4px;
    align-self: center;
}
.vs-filter-clear-all:hover { color: #e85c33; }

/* 결과 헤더 */
.vs-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0 12px;
    margin-bottom: 4px;
}
.vs-result-count { font-size: 13px !important; color: #666; }
.vs-result-count strong { color: #e85c33; font-size: 15px !important; font-weight: 700; }

/* ============================================================
   결과 카드 리스트
============================================================ */
.vs-list { list-style: none; padding: 0; margin: 0; }
.vs-item {
    display: flex;
    gap: 22px;
    padding: 18px;
    margin-bottom: 12px;
    border: 1px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.15s ease;
    background: #fff;
}
.vs-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
    border-color: #e0d0c8;
}
.vs-item.masked { cursor: pointer; }
.vs-thumb.is-blurred { overflow: hidden; }
.vs-thumb.is-blurred img { filter: blur(14px); transform: scale(1.05); }

.vs-thumb {
    flex-shrink: 0;
    width: 260px;
    aspect-ratio: 16 / 9;
    background: #f4f4f4;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.vs-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.vs-thumb-icon { font-size: 32px !important; color: #ccc; }
.vs-thumb-private-badge {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 12px !important;
    line-height: 1;
    border-radius: 0 0 6px 0;
    pointer-events: none;
    z-index: 2;
}
.vs-thumb-private-badge svg {
    display: block;
    flex-shrink: 0;
}

.vs-item-body { flex: 1; min-width: 0; padding-top: 2px; }
.vs-item-title {
    font-size: 17px !important;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vs-item:hover .vs-item-title { color: #e85c33; }
.vs-item-meta {
    font-size: 12px !important;
    color: #999;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}
.vs-item-meta-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.vs-item-date {
    font-size: 11px !important;
    color: #bbb;
    white-space: nowrap;
    flex-shrink: 0;
}
.vs-item-meta-pl {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 12px !important;
    color: #666;
}
.vs-item-desc {
    font-size: 13px !important;
    color: #555;
    line-height: 1.55;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.vs-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
/* 비공개(masked) 카드: 설명/태그/등록일 자리를 대신하는 안내문구 */
.vs-item-private-notice {
    font-size: 13px !important;
    color: #999;
    font-style: italic;
    line-height: 1.55;
}
.vs-tag {
    display: inline-block;
    font-size: 11px !important;
    color: #e85c33;
    background: #fff5f2;
    border-radius: 10px;
    padding: 2px 9px;
    line-height: 1.4;
}

/* 키워드 하이라이트 */
.vs-hl {
    background: #fff2bf;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 700;
}

/* 로딩 */
.vs-loading { text-align: center; padding: 80px 20px; color: #888; }
.vs-spinner {
    border: 4px solid #f0f0f0;
    border-top: 4px solid #e85c33;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: vsspin 0.8s linear infinite;
    margin: 0 auto 14px;
}
@keyframes vsspin { to { transform: rotate(360deg); } }

/* 빈 결과 */
.vs-empty { text-align: center; padding: 60px 20px; color: #888; }
.vs-empty-title { font-size: 16px !important; color: #444; margin-bottom: 6px; font-weight: 600; }
.vs-empty-desc { font-size: 13px !important; color: #999; margin-bottom: 20px; }
.vs-empty-popular-title {
    font-size: 12px !important;
    color: #aaa;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}
.vs-empty-popular-chips {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}
.vs-empty-popular-chip {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e85c33;
    color: #e85c33;
    border-radius: 16px;
    padding: 5px 14px;
    font-size: 13px !important;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
}
.vs-empty-popular-chip:hover {
    background: #e85c33;
    color: #fff;
}

/* 페이지네이션 */
.vs-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.vs-pagination button {
    min-width: 36px;
    padding: 7px 12px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 6px;
    font-size: 13px !important;
    font-family: inherit;
    cursor: pointer;
    color: #555;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.vs-pagination button:hover:not(:disabled) {
    background: #fff5f2;
    border-color: #e85c33;
    color: #e85c33;
}
.vs-pagination button:disabled { opacity: 0.35; cursor: default; }
.vs-pagination button.active {
    background: #e85c33;
    color: #fff;
    border-color: #e85c33;
}
.vs-page-info { text-align: center; margin-top: 10px; font-size: 12px !important; color: #aaa; }

/* 초기 안내 */
.vs-initial {
    text-align: center;
    padding: 80px 20px;
    color: #aaa;
}
.vs-initial p { font-size: 15px !important; }

@media (max-width: 768px) {
    .vs-search-bar { padding: 4px 4px 4px 16px; }
    .vs-search-input { font-size: 14px !important; padding: 12px 6px; }
    .vs-search-btn { padding: 0 18px; font-size: 13px !important; }
    .vs-item { flex-direction: column; gap: 12px; padding: 14px; }
    .vs-thumb { width: 100%; }
    .vs-chip-panel { left: auto; right: 0; }
}

/* ========== 영상 상세 모달 리뉴얼 ========== */
.vd-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
}
.vd-modal {
    background: #fff;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
/* 닫기 버튼 */
.vd-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0,0,0,0.08);
    color: #444;
    font-size: 18px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    border-radius: 50%;
    transition: background 0.15s ease, color 0.15s ease;
}
.vd-modal-close:hover { background: #e85c33; color: #fff; }

/* 플레이어 영역 */
.vd-modal-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    flex-shrink: 0;
}
.vd-modal-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.vd-modal-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

/* 비공개 영상 상세 모달 — 비디오 자리 차단 + 안내 오버레이 */
.vd-modal-private {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    overflow: hidden;
    flex-shrink: 0;
}
.vd-modal-private-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(14px);
    transform: scale(1.08);
}
.vd-modal-private-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    text-align: center;
}
.vd-modal-private-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    margin-bottom: 4px;
}
.vd-modal-private-title {
    margin: 0;
    font-size: 18px !important;
    font-weight: 700;
}
.vd-modal-private-desc {
    margin: 0;
    font-size: 14px !important;
    opacity: 0.92;
    line-height: 1.5;
}
.vd-modal-private-org {
    margin-top: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 14px !important;
    font-weight: 600;
}

/* 바디 스크롤 */
.vd-modal-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* 헤더 (제목 영역) */
.vd-modal-header {
    flex-shrink: 0;
    padding: 20px 56px 16px 22px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}
.vd-modal-header-title {
    font-size: 18px !important;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.45;
    word-break: break-word;
}

/* 정보 섹션 — 테이블 대신 카드형 행 */
.vd-info-section {
    padding: 18px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
/* 비공개(masked) 상세 모달 신규 요약 필드 6종 — 아래 일반 정보 섹션과 시각적으로 구분 */
.vd-modal-private-fields {
    border-bottom: 8px solid #f5f5f5;
}
.vd-info-row {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    gap: 0;
}
.vd-info-row:last-child { border-bottom: none; }
.vd-info-label {
    flex-shrink: 0;
    width: 80px;
    font-size: 12px !important;
    font-weight: 600;
    color: #999;
    letter-spacing: 0.3px;
    padding-top: 1px;
    text-transform: uppercase;
}
.vd-info-value {
    flex: 1;
    min-width: 0;
    font-size: 13.5px !important;
    color: #333;
    line-height: 1.6;
    word-break: break-word;
}
.vd-detail-desc {
    white-space: pre-wrap;
    font-size: 13px !important;
    color: #555;
    line-height: 1.7;
}
.vd-hero-info { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0; }
.vd-hero-sep {
    margin: 0 6px;
    color: #ccc;
    font-weight: 300;
    font-size: 12px !important;
    user-select: none;
}

/* 태그 */
.vd-modal-tag {
    display: inline-block;
    background: #fff5f2;
    border: 1px solid #f0c4b8;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px !important;
    color: #e85c33;
    margin: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.12s ease;
}
.vd-modal-tag:hover { background: #ffe8e0; }

/* YouTube 버튼 — 강조 */
.vd-modal-btn-yt {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ff0000;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 18px;
    font-size: 13px !important;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.vd-modal-btn-yt:hover { background: #cc0000; color: #fff; transform: translateY(-1px); }

/* 로딩/에러 */
.vd-modal-loading, .vd-modal-error {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}
.vd-modal-spinner {
    border: 4px solid #f0f0f0;
    border-top: 4px solid #e85c33;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: vdmspin 0.8s linear infinite;
    margin: 0 auto 12px;
}
@keyframes vdmspin { to { transform: rotate(360deg); } }
.vd-modal-error-icon { font-size: 40px !important; margin-bottom: 12px; }

@media (max-width: 768px) {
    .vd-modal-overlay { padding: 0; align-items: flex-end; }
    .vd-modal { max-height: 95vh; border-radius: 16px 16px 0 0; }
    .vd-info-label { width: 66px; }
}

/* ========== 시소로스DB 검색 모달 ========== */
.vt-modal {
    max-width: 560px;
    max-height: 80vh;
}
.vt-modal-body {
    padding: 18px 22px 22px;
}
.vt-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.vt-search-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px !important;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}
.vt-search-input:focus { border-color: #e85c33; }
.vt-search-btn {
    flex-shrink: 0;
    border: none;
    background: #e85c33;
    color: #fff;
    font-size: 13px !important;
    font-weight: 700;
    font-family: inherit;
    border-radius: 8px;
    padding: 0 20px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.vt-search-btn:hover { background: #d04d27; }
.vt-error {
    background: #fff5f2;
    color: #c0392b;
    border: 1px solid #f0c4b8;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px !important;
    margin-bottom: 14px;
    line-height: 1.5;
}
.vt-loading, .vt-empty, .vt-initial {
    text-align: center;
    padding: 40px 10px;
    color: #888;
    font-size: 13px !important;
}
.vt-result-count {
    font-size: 13px !important;
    color: #666;
    margin-bottom: 10px;
}
.vt-result-count strong { color: #e85c33; }
.vt-selected-count { color: #0a3d62; font-weight: 600; margin-left: 4px; }
.vt-list {
    list-style: none;
    margin: 0 0 6px;
    padding: 0;
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
}
.vt-list-item { border-bottom: 1px solid #f5f5f5; }
.vt-list-item:last-child { border-bottom: none; }
.vt-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px !important;
}
.vt-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0a3d62;
    cursor: pointer;
    flex-shrink: 0;
}
.vt-term { color: #333; word-break: break-word; }
.vt-preferred { color: #999; font-size: 12px !important; white-space: nowrap; }
.vt-pagination { margin-top: 14px; }
.vt-modal-actions {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
}

@media (max-width: 768px) {
    .vs-search-bar { flex-wrap: wrap; border-radius: 20px; }
    .vs-search-bar .vs-thesaurus-btn { margin-left: 0; margin-top: 6px; }
    .vt-check-label { flex-wrap: wrap; }
}
