/**
 * 파일 업로드 통합 스타일 — common/file-upload.css
 * FileUpload / FileList (theme:'v1' 표준) 의 드롭존 · 선택(스테이징) 목록 · 업로드된 문서 목록 · 빈 상태.
 * 파일 업로드 관련 CSS 는 전부 이 파일에서 관리(이후 신규도 여기에). 표준 클래스 단일(dv-* 폐지 완료).
 */

/* ── 드롭존 컨테이너 ─────────────────────────────────────── */
.upload-dropzone {
    border: 2px dashed var(--bs-border-muted);
    border-radius: var(--bs-radius);
    background: var(--bs-bg-secondary);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}
.upload-dropzone:hover {
    border-color: var(--bs-primary) !important;
    background: var(--bs-bg-primary-light) !important;
}
.upload-dropzone.drop-zone-active {
    border-color: var(--bs-primary) !important;
    background: var(--bs-bg-primary) !important;
}

/* ── 드롭존 본문 (file-upload.js 가 .drop-zone-content 안에 렌더) ── */
.upload-dropzone-icon {
    color: var(--bs-muted);
    margin-bottom: 12px;
    line-height: 1;
    display: none;
}
.upload-dropzone:hover .upload-dropzone-icon,
.upload-dropzone.drop-zone-active .upload-dropzone-icon {
    color: var(--bs-primary);
}
.upload-dropzone-title {
    font-size: var(--font-large);
    font-weight: 600;
    color: var(--bs-text);
    margin: 0 0 0.25rem 0;
}
.upload-dropzone-sub {
    font-size: var(--font-normal);
    color: var(--bs-muted);
    margin: 0;
    text-align: center;
    font-weight: 500;
}
.upload-dropzone-link {
    color: var(--bs-primary);
    font-weight: 600;
}
.upload-dropzone-hint {
    font-size: var(--font-small);
    color: var(--bs-muted);
    margin: 4px 0 0 0;
}

/* ── 선택(스테이징) 파일 목록 컨테이너 ───────────────────── */
.document-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

/* ── 업로드된 문서 목록 컨테이너 (대시 박스, 옵션) ────────── */
.document-list-group {
    padding: 10px 20px;
    border: 2px dashed var(--bs-border-muted);
    border-radius: var(--bs-radius);
    background: var(--bs-white);
    overflow-y: auto;
    max-height: 300px;
    scrollbar-width: thin;
}

/* ── 파일 1행 ───────────────────────────────────────────── */
.document-list-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
}
.document-list-item-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.document-list-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #e0e7ff;
    color: #4f46e5;
    border-radius: 8px;
    flex-shrink: 0;
}
.document-list-item-meta {
    flex: 1;
    min-width: 0;
}
.document-list-item-name {
    font-size: var(--font-normal);
    font-weight: 600;
    color: var(--bs-primary);
    text-decoration: none;
    transition: color 0.15s;
    display: flex;
    align-items: center;
}
.document-list-item-size {
    display: block;
    font-size: var(--font-small);
    color: var(--bs-muted);
    font-weight: 500;
}
.document-list-item-label {
    margin-top: 10px;
}
.document-list-item-label-lbl {
    display: block;
    font-size: var(--font-small);
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--bs-muted);
    margin-bottom: 4px;
}
.document-list-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: var(--bs-danger);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.document-list-remove:hover {
    background: var(--bs-danger);
    color: #fff;
    border-color: var(--bs-danger);
}

/* ── 업로드된 문서 액션 버튼 (아이콘 버튼) ───────────────── */
.document-list-act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.document-list-act-primary {
    border-color: var(--bs-border-primary);
    color: var(--bs-primary);
}
.document-list-act-primary:hover {
    background: var(--bs-primary);
    color: var(--bs-white);
    border-color: var(--bs-primary);
}
.document-list-act-danger {
    border-color: var(--bs-border-danger);
    color: var(--bs-danger);
}
.document-list-act-danger:hover {
    background: var(--bs-danger);
    color: var(--bs-white);
    border-color: var(--bs-danger);
}

/* ── 빈 상태 (문서 없음) ─────────────────────────────────── */
.document-list-empty {
    padding: 8px 0;
    text-align: center;
}
.document-list-empty-title {
    font-size: var(--font-large);
    font-weight: 600;
    color: var(--bs-text);
}
.document-list-empty-sub {
    font-size: var(--font-normal);
    color: var(--bs-muted);
    font-weight: 500;
}

/* 박스(.document-list-group) 내부의 빈상태는 자체 박스를 벗겨 한 겹으로(이중 박스 방지).
   .dv-doc-empty 는 노트 등 박스 없는 컨테이너에서 자체 박스 유지. */
.document-list-group .dv-doc-empty {
    background: none;
    border: 0;
    border-radius: 0;
    padding: 8px 0;
}

/* ── 사진 슬롯 (고정 칸 수 · 칸당 1장) ────────────────────
   Plane Model Mgmt > DOCUMENTS 의 EXTERIOR / INTERIOR 1 / INTERIOR 2 / INTERIOR 3.
   "여러 장 리스트"가 아니라 "정해진 칸을 채운다"는 UI 라 .document-list-* 와 별개 계열로 둔다. */
.photo-slots-hint {
    font-size: var(--font-normal);
    color: var(--bs-muted);
    margin: 0 0 12px 0;
}
.photo-slots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.photo-slot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.photo-slot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.photo-slot-title {
    font-size: var(--font-normal);
    font-weight: 600;
    color: var(--bs-text);
    letter-spacing: 0.02em;
}
.photo-slot-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    aspect-ratio: 4 / 3;
    padding: 10px;
    text-align: center;
    border: 2px dashed var(--bs-border-muted);
    border-radius: var(--bs-radius);
    background: var(--bs-bg-secondary);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s, background-color 0.2s;
}
.photo-slot-drop:hover {
    border-color: var(--bs-primary);
    background: var(--bs-bg-primary-light);
}
.photo-slot-drop.drop-zone-active {
    border-color: var(--bs-primary);
    background: var(--bs-bg-primary);
}
.photo-slot-drop.has-image {
    padding: 0;
    border-style: solid;
    background: var(--bs-bg-secondary);
}
.photo-slot-drop.is-readonly,
.photo-slot-drop.is-busy {
    cursor: default;
}
.photo-slot-drop.is-readonly:hover,
.photo-slot-drop.is-busy:hover {
    border-color: var(--bs-border-muted);
    background: var(--bs-bg-secondary);
}
.photo-slot-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.photo-slot-placeholder {
    font-size: var(--font-normal);
    color: var(--bs-muted);
    line-height: 1.4;
}
.photo-slot-browse {
    color: var(--bs-primary);
    font-weight: 600;
}
.photo-slot-hint {
    font-size: var(--font-small);
    color: var(--bs-muted);
}
.photo-slot-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.photo-slot-filename {
    font-size: var(--font-small);
    color: var(--bs-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.photo-slot-size {
    font-size: var(--font-small);
    color: var(--bs-muted);
}
.photo-slot-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.photo-slot-actions .btn {
    flex: 1 1 0;
    min-width: 0;
}
