/* public/css/quote.css - V2.0 정리된 버전 */

/* --- 파일 업로드 버튼 및 미리보기 공통 디자인 --- */

/* 버튼들을 감싸는 영역 */
.file-upload-controls {
    display: flex; /* 버튼을 가로로 나란히 배치 */
    gap: 10px;     /* 버튼 사이 간격 */
    margin-top: 10px;
}

/* '파일 찾기', '카메라 촬영' 버튼 공통 스타일 */
.upload-btn {
    flex: 1; /* 버튼이 동일한 너비를 갖도록 설정 */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px; /* 아이콘과 텍스트 사이 간격 */
    padding: 12px 15px;
    background-color: #4A5568; /* 어두운 회색 */
    color: #FFFFFF !important; /* 글자색을 흰색으로 고정 */
    border: 1px solid transparent;
    border-radius: var(--border-radius-md, 8px); /* common.css 변수가 있으면 사용 */
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: center;
}

.upload-btn:hover {
    background-color: #2D3748; /* 더 어두운 회색 */
}

/* 유효성 검사 실패 시 테두리 강조 */
.file-upload-controls.invalid .upload-btn {
    border-color: #dc3545 !important;
}

/* 실제 파일 업로드 input을 시각적으로만 숨김 */
.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* 파일 미리보기 전체 컨테이너 */
#file-preview-container {
    margin-top: 15px;
    padding: 1rem;
    border: 1px dashed #ccc;
    border-radius: var(--border-radius-md, 8px);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    min-height: 120px;
    background-color: #f9f9f9;
    align-content: flex-start;
}

/* 파일 없을 때 안내 문구 (JS로 제어됨) */
#file-preview-container.empty {
    padding-top: 50px;
    padding-bottom: 50px;
    display: grid;
    place-items: center;
}

#file-preview-container.empty::before {
    content: "여기에 선택한 파일이 표시됩니다.";
    font-size: 14px;
    color: #aaa;
    width: 100%;
    text-align: center;
    align-self: center;
}


/* 개별 파일 미리보기 아이템 */
.preview-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.preview-item img, 
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .file-icon {
    font-size: 2.5rem;
    color: #4A5568;
}

.preview-item .file-info {
    box-sizing: border-box;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.75rem;
    padding: 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-item .delete-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.delete-button:hover {
    background-color: rgba(220, 53, 69, 0.9);
}

/* 모델별 사용환경 체크리스트 */
.model-checklist {
    background-color: #fffbe6;
    border: 1px solid #ffe8a3;
    border-radius: var(--border-radius-md);
    padding: 25px;
    margin-top: 20px;
}
.model-checklist.invalid {
    border: 1px solid #dc3545;
}

.checklist-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 0;
    margin-bottom: 15px;
}

.checklist-warning {
    font-size: 0.9rem;
    font-weight: 500;
    color: #d9480f;
    margin-top: 20px;
    padding: 10px;
    background-color: #fff0e6;
    border-radius: 8px;
    text-align: center;
}