/* 문의내역 페이지 전용 스타일 */

body {background:#fff;}

/* 카테고리 필터 라디오 버튼 숨김 */
input[name="category-filter"] {
    display: none;
}

/* 메인 컨테이너 */
.inquiry-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 80px 20px;
}

/* 페이지 헤더 */
.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #bb877a 0%, #9f806f 100%);
    -webkit-background-clip: text; 
    background-clip: text;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1rem;
    color: #917e79;
}

/* 필터 & 액션 바 */
.filter-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

/* 카테고리 필터 */
.category-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: #bb877a;
    color: #bb877a;
}

/* 필터 활성화 스타일 */
#filter-all:checked ~ .inquiry-container .category-filter label[for="filter-all"],
#filter-product:checked ~ .inquiry-container .category-filter label[for="filter-product"],
#filter-delivery:checked ~ .inquiry-container .category-filter label[for="filter-delivery"],
#filter-return:checked ~ .inquiry-container .category-filter label[for="filter-return"],
#filter-etc:checked ~ .inquiry-container .category-filter label[for="filter-etc"] {
    background: #bb877a ;
    color: white;
    border-color: transparent;
}

/* 새 문의 작성 버튼 */
.btn-new-inquiry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background:  #bb877a ;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-new-inquiry:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 문의 리스트 */
.inquiry-list {
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
    border-top: 2px solid #e5d4cf;
    border-bottom: 2px solid #e5d4cf;
}

.inquiry-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 35px;
    border-top: 1px solid #efe0db;
    text-decoration: none;
    color: #333;
    transition: background 0.3s ease;
}

.inquiry-item:first-child {
    border-top: none;
}

.inquiry-item:hover {
    background: #faf8f8;
}

.inquiry-item-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.inquiry-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.inquiry-status.completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.inquiry-status.pending {
    background: #fff3e0;
    color: #e65100;
}

.inquiry-title {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inquiry-meta {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    color: #999;
    font-size: 0.9rem;
}

.inquiry-date {
    white-space: nowrap;
}

.inquiry-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    color: #999;
}

.inquiry-empty-desc {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #bbb;
}


/* 배지 영역 */
.inquiry-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 카테고리 배지 */
.badge-category {
    font-weight: 600;
}

.badge-product {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-delivery {
    background-color: #fff3e0;
    color: #ef6c00;
}

.badge-return {
    background-color: #fce4ec;
    color: #c2185b;
}

.badge-etc {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* 답변 상태 배지 */
.badge-completed {
    background-color: #e3f2fd;
    color: #1976d2;
}

.badge-pending {
    background-color: #fff3e0;
    color: #f57c00;
}
.inquiry-date {
    font-size: 0.9rem;
    color: #999;
}

/* 모달 체크박스 숨김 */
.modal-checkbox {
    display: none;
}

/* 모달 오버레이 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 체크박스 체크 시 모달 표시 */
.modal-checkbox:checked ~ .modal-overlay {
    display: flex;
    opacity: 1;
}

/* 모달 컨테이너 */
.modal-container {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease;
}

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

/* 모달 헤더 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.modal-close {
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

/* 모달 바디 */
.modal-body {
    padding: 24px;
}

/* 문의 폼 */
.inquiry-form .form-group {
    margin-bottom: 20px;
}

.inquiry-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.inquiry-form input,
.inquiry-form select,
.inquiry-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Noto Sans KR', sans-serif;
    transition: border-color 0.3s ease;
}

.inquiry-form input:focus,
.inquiry-form select:focus,
.inquiry-form textarea:focus {
    outline: none;
    border-color: #9f806f;
}

.inquiry-form textarea {
    resize: vertical;
    min-height: 150px;
}

/* 폼 액션 버튼 */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background-color: #f5f5f5;
    color: #666;
    display: inline-block;
    text-align: center;
}

.btn-cancel:hover {
    background-color: #e0e0e0;
}

.btn-submit {
    background: linear-gradient(135deg, #bb877a 0%, #9f806f 100%);
    color: white;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover {
    border-color: #9f806f;
    color: #9f806f;
}

.pagination a.active {
    background: linear-gradient(135deg, #bb877a 0%, #9f806f 100%);
    color: white;
    border-color: transparent;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    
    .page-header p {font-size:0.9rem}

    .inquiry-container {
        padding: 20px 15px;
    }

    .page-header h1 {
        font-size: 30px;
    }

    .filter-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .category-filter {
        justify-content: center;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .btn-new-inquiry {
        width: 100%;
        justify-content: center;
    }

    .inquiry-item {
        padding: 20px;
    }

    .inquiry-title {
        font-size: 1rem;
    }

    .inquiry-item-main {gap:2px;}

    .inquiry-status {padding:2px 10px;margin-left:-4px;}

    .inquiry-date {
        font-size:0.8rem;
    }

    .modal-container {
        width: 95%;
    }

    .modal-header,
    .modal-body {
        padding: 20px;
    }

    .inquiry-item {flex-direction: column;align-items: flex-start;}

    .inquiry-item-main {flex-direction: column; align-items: flex-start;}


}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 26px;
    }

    .category-filter {
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x:scroll;
        padding-left:22px;
    }

    .filter-btn {
        padding: 7px 12px;
        font-size: 0.85rem;
    }

    .btn-new-inquiry {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .inquiry-item {
        padding: 16px;
    }

    .inquiry-badges {
        gap: 6px;
    }

    .badge {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
