/* =====================================================
   Print 페이지 전용 스타일
   ===================================================== */

/* =====================================================
   오버레이 모드 (index.php 내장 print 섹션)
   ===================================================== */
.print-section-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 300;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.print-section-overlay.active {
    display: block;
}

/* 헤더 */
/* → common.css 공통 헤더 스타일 사용 */

/* 히어로 (비디오 배너) */
.print-hero {
    margin-top: 48px; /* 헤더 높이 */
    width: 100%;
    height: 180px;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
}

.print-hero video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 메인 컨테이너 */
.print-container {
    padding: 16px;
}

/* =====================================================
   파일 정보 카드
   ===================================================== */
.file-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.option-summary {
    display: inline-block;
    background: #5a86ff;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 10px;
}
.file-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.file-name {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.file-icon {
    width: 32px;
    height: 32px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}
/* 파일 아이콘 종류 */
.file-icon.icon-doc { background-image: url('../images/file_icons/icon_doc.png'); }
.file-icon.icon-hwp { background-image: url('../images/file_icons/icon_hwp.png'); }
.file-icon.icon-jpg { background-image: url('../images/file_icons/icon_jpg.png'); }
.file-icon.icon-pdf { background-image: url('../images/file_icons/icon_pdf.png'); }
.file-icon.icon-png { background-image: url('../images/file_icons/icon_png.png'); }
.file-icon.icon-ppt { background-image: url('../images/file_icons/icon_ppt.png'); }
.file-icon.icon-xls { background-image: url('../images/file_icons/icon_xls.png'); }
.file-icon.icon-etc { background-image: url('../images/file_icons/icon_etc.png'); }

.file-name-text {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.attach-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.attach-btn img {
    width: 28px;
    height: 28px;
}

/* =====================================================
   가격 안내
   ===================================================== */
.price-notice {
    font-size: 12px;
    color: #888;
    padding: 8px 4px 4px;
}

/* =====================================================
   옵션 섹션
   ===================================================== */
.options-section {
    margin-top: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}
.option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}
.option-row:last-child {
    border-bottom: none;
}
.option-label {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    margin-right: 12px;
}
.option-input {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 숫자 입력 (부수) */
.number-input {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}
.num-btn {
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.num-btn:active {
    background: #e0e0e0;
}
.num-btn.minus {
    border-right: 1px solid #ddd;
}
.num-btn.plus {
    border-left: 1px solid #ddd;
}
#copiesInput {
    width: 48px;
    height: 36px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    background: #fff;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    appearance: none;
}
#copiesInput::-webkit-outer-spin-button,
#copiesInput::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 라디오 버튼 */
.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}
.radio-label input[type="radio"] {
    display: none;
}
.radio-custom {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ccc;
    position: relative;
    transition: border-color 0.15s;
    flex-shrink: 0;
}
.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #5a86ff;
}
.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #5a86ff;
}

/* =====================================================
   출력하기 버튼
   ===================================================== */
.print-submit-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 16px;
    background: #5a86ff;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.print-submit-btn:active {
    background: #4070e8;
}
.print-submit-btn:disabled {
    background: #b0c4ff;
    cursor: not-allowed;
}

/* =====================================================
   배너
   ===================================================== */
.print-banner {
    padding: 8px 16px 24px;
}
.print-banner img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

/* =====================================================
   로딩 오버레이
   ===================================================== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.loading-overlay.active {
    display: flex;
}
.loading-process-img {
    width: 182px;
    height: 300px;
    object-fit: contain;
    display: none;
}
.loading-overlay.active .loading-process-img {
    display: block;
}
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.loading-text {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}

/* =====================================================
   PC 레이아웃 — 400px 고정
   ===================================================== */
@media (min-width: 450px) {
    .print-section-overlay {
        max-width: 400px;
        left: 50%;
        transform: translateX(-50%);
    }

    .print-section-overlay.active {
        transform: translateX(-50%);
    }

    .loading-overlay {
        max-width: 400px;
        left: 50%;
        transform: translateX(-50%);
    }
}
