/* 문의 게시판 CSS */

/* 메인 섹션 */
.inquiry-section {
    padding: 60px 0 100px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    min-height: calc(100vh - 200px);
}

.inquiry-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 */
.inquiry-header {
    text-align: center;
    margin-bottom: 40px;
}

.inquiry-title {
    font-size: 42px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #0058a3 0%, #003d7a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.inquiry-subtitle {
    font-size: 18px;
    color: #64748b;
    font-weight: 400;
}

/* 카테고리 탭 */
.inquiry-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
}

.inquiry-tab {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    top: 2px;
}

.inquiry-tab:hover {
    color: #0058a3;
}

.inquiry-tab.active {
    color: #0058a3;
    border-bottom-color: #0058a3;
}

/* 문의하기 버튼 */
.inquiry-action-top,
.inquiry-action-bottom {
    text-align: center;
    margin: 30px 0;
}

.btn-inquiry-write {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #0058a3, #003d7a);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 88, 163, 0.3);
    text-decoration: none;
}

.btn-inquiry-write:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 88, 163, 0.4);
    color: #ffffff;
}

.btn-inquiry-write i {
    font-size: 18px;
}

/* 통계 정보 */
.inquiry-info {
    margin-bottom: 20px;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: right;
}

.inquiry-count {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* 문의 목록 테이블 */
.inquiry-list-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 30px;
}

.inquiry-table {
    width: 100%;
    border-collapse: collapse;
}

.inquiry-table thead {
    background: linear-gradient(135deg, #0058a3, #003d7a);
}

.inquiry-table thead th {
    padding: 18px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.inquiry-table tbody td {
    padding: 18px 6px;
    text-align: center;
    font-size: 14px;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
}

.inquiry-table tbody tr:hover {
    background: #f8f9fa;
}

.inquiry-table tbody tr:last-child td {
    border-bottom: none;
}

.inquiry-category-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #e0f2fe;
    color: #0058a3;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.inquiry-title-cell {
    text-align: left !important;
}

.inquiry-title-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.inquiry-title-link:hover {
    color: #0058a3;
}

.inquiry-title-link i {
    font-size: 14px;
    color: #94a3b8;
}

.reply-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.reply-status-badge.answered {
    background: #dbeafe;
    color: #0058a3;
}

.reply-status-badge.waiting {
    background: #fef3c7;
    color: #d97706;
}

.inquiry-empty {
    padding: 60px 20px;
    text-align: center;
    color: #94a3b8;
}

.inquiry-empty i {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* 페이징 */
.inquiry-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination-btn:hover {
    border-color: #0058a3;
    color: #0058a3;
    background: #f0f9ff;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #0058a3, #003d7a);
    border-color: #0058a3;
    color: #ffffff;
}

/* 문의하기 모달 */
.inquiry-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.inquiry-modal.active {
    display: flex;
}

.inquiry-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.inquiry-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10001;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inquiry-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 30px;
    border-bottom: 1px solid #e2e8f0;
}

.inquiry-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.inquiry-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f9fa;
    border-radius: 8px;
    color: #64748b;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inquiry-modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.inquiry-form-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.required {
    color: #dc2626;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #0058a3;
    box-shadow: 0 0 0 4px rgba(0, 88, 163, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-text {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #1e293b;
}

.form-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0058a3;
}

.inquiry-write-card .inquiry-form-footer {
    display: flex;
    gap: 12px;
    padding: 30px 0 0 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 30px;
    justify-content: flex-end;
}

.btn-cancel,
.btn-submit {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #f8f9fa;
    color: #64748b;
}

.btn-cancel:hover {
    background: #e2e8f0;
}

.btn-submit {
    background: linear-gradient(135deg, #0058a3, #003d7a);
    color: #ffffff;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 88, 163, 0.3);
}

/* 알림 메시지 */
.inquiry-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.inquiry-alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.inquiry-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.inquiry-alert i {
    font-size: 18px;
}

/* 문의 작성 페이지 스타일 */
.inquiry-write-header {
    margin-bottom: 40px;
}

.inquiry-write-title {
    font-size: 42px;
    font-weight: 700;
    color: #1e293b;
    margin: 20px 0 15px 0;
    background: linear-gradient(135deg, #0058a3 0%, #003d7a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.inquiry-write-subtitle {
    font-size: 18px;
    color: #64748b;
    font-weight: 400;
}

.inquiry-write-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 40px;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #0058a3;
}

/* 파일 업로드 영역 */
.file-upload-area {
    position: relative;
}

.file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    border-color: #0058a3;
    background: #f0f9ff;
}

.file-upload-text {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.file-upload-label i {
    font-size: 20px;
    color: #0058a3;
}

.file-list {
    margin-top: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
}

.file-item i {
    font-size: 18px;
    color: #0058a3;
}

.file-name {
    flex: 1;
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
}

.file-size {
    font-size: 12px;
    color: #64748b;
}

.file-remove {
    width: 28px;
    height: 28px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.file-remove:hover {
    background: #dc2626;
    color: white;
}

/* 개인정보 동의 박스 */
.privacy-agreement-box {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    background: #f8f9fa;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.privacy-content {
    font-size: 13px;
    line-height: 1.8;
    color: #1e293b;
}

.privacy-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: #0058a3;
    margin-bottom: 16px;
}

.privacy-content p {
    margin-bottom: 12px;
}

.privacy-content ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.privacy-content li {
    margin-bottom: 6px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .inquiry-section {
        padding: 40px 0 60px;
    }

    .inquiry-title {
        font-size: 32px;
    }

    .inquiry-subtitle {
        font-size: 16px;
    }

    .inquiry-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }

    .inquiry-tab {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* 모바일: 문의 목록 카드형 레이아웃 */
    .inquiry-list-wrapper {
        border-radius: 12px;
        overflow: visible;
    }

    .inquiry-table {
        font-size: 14px;
    }

    .inquiry-table thead {
        display: none;
    }

    .inquiry-table tbody,
    .inquiry-table tbody tr,
    .inquiry-table tbody td {
        display: block;
    }

    .inquiry-table tbody tr.inquiry-row {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: stretch;
        margin-bottom: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        overflow: hidden;
        transition: box-shadow 0.2s ease, border-color 0.2s ease;
    }

    .inquiry-table tbody tr.inquiry-row:hover {
        border-color: #cbd5e1;
        box-shadow: 0 4px 12px rgba(0, 88, 163, 0.08);
    }

    .inquiry-table tbody tr.inquiry-row:last-child {
        margin-bottom: 0;
    }

    /* 1줄: 구분·답변여부·번호 / 2줄: 제목 / 3줄: 작성자·날짜 */
    .inquiry-table tbody tr.inquiry-row td:nth-child(1) {
        order: 1;
        flex: 0 0 18%;
        max-width: 18%;
    }
    .inquiry-table tbody tr.inquiry-row td:nth-child(2) {
        order: 2;
        flex: 1 0 35%;
        min-width: 0;
    }
    .inquiry-table tbody tr.inquiry-row td:nth-child(3) {
        order: 4;
        flex: 0 0 100%;
        width: 100%;
        border-top: 1px solid #e2e8f0;
    }
    .inquiry-table tbody tr.inquiry-row td:nth-child(4) {
        order: 3;
        flex: 0 0 25%;
        max-width: 25%;
    }
    .inquiry-table tbody tr.inquiry-row td:nth-child(5) {
        order: 5;
        flex: 0 0 50%;
        max-width: 50%;
        border-top: 1px solid #f1f5f9;
    }
    .inquiry-table tbody tr.inquiry-row td:nth-child(6) {
        order: 6;
        flex: 0 0 50%;
        max-width: 50%;
    }

    .inquiry-table tbody td[data-label] {
        padding: 10px 12px;
        text-align: left;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px;
        border-bottom: none;
    }

    .inquiry-table tbody td[data-label]::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        color: #64748b;
        letter-spacing: 0.02em;
        display: inline;
        flex-basis: auto;
        width: auto;
        margin-bottom: 0;
        margin-right: 4px;
    }

    .inquiry-table tbody td.inquiry-title-cell {
        padding: 12px 16px;
    }

    .inquiry-table tbody td.inquiry-title-cell::before {
        display: none;
    }

    /* 모바일: 구분·답변여부 라벨 숨김, 뱃지만 노출 */
    .inquiry-table tbody td[data-label="구분"]::before,
    .inquiry-table tbody td[data-label="답변여부"]::before {
        display: none;
    }

    .inquiry-table tbody td.inquiry-title-cell .inquiry-title-link {
        display: block;
        width: 100%;
        font-size: 15px;
        font-weight: 600;
        color: #1e293b;
        line-height: 1.45;
        word-break: keep-all;
        white-space: normal;
    }

    .inquiry-table tbody td.inquiry-title-cell .inquiry-title-link i {
        margin-right: 6px;
        vertical-align: -0.15em;
    }

    /* 1줄: 번호·구분·답변여부 하단 구분선 */
    .inquiry-table tbody tr.inquiry-row td:nth-child(1),
    .inquiry-table tbody tr.inquiry-row td:nth-child(2),
    .inquiry-table tbody tr.inquiry-row td:nth-child(4) {
        border-bottom: 1px solid #e2e8f0;
    }

    .inquiry-table tbody td.inquiry-empty {
        padding: 40px 20px;
        text-align: center;
        border: none;
    }

    .inquiry-table tbody td.inquiry-empty::before {
        display: none;
    }

    .inquiry-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .inquiry-form-footer {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
    }

    .inquiry-write-card {
        padding: 24px;
    }

    .inquiry-write-title {
        font-size: 32px;
    }

    .form-section {
        padding-bottom: 24px;
        margin-bottom: 30px;
    }

    .privacy-agreement-box {
        max-height: 300px;
        padding: 16px;
    }
}

/* 문의 작성 — 스팸 방지 숨김 필드(봇 전용, 화면 밖 배치) */
.inq-write-antispam-hp {
    position: absolute !important;
    left: -12000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

.inq-write-flash-error {
    background: #fef2f2;
    color: #b91c1c;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    border-left: 4px solid #ef4444;
    font-size: 15px;
    line-height: 1.5;
}

.inq-write-flash-error i {
    margin-right: 8px;
    vertical-align: -0.1em;
}

