/* contact.css */
.contact-page {
    padding-top: 100px;
    padding-bottom: 50px;
    min-height: auto;
    background: #ffffff;
}

.contact-container {
    max-width: 1400px; /* 전체 컨테이너 너비 확장 */
    margin: 0 auto;
    padding: 40px 20px;
}

/* 메인 레이아웃 */
.contact-sections-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* 고객센터 섹션 */
.customer-service-section {
    flex-basis: 300px;
    flex-shrink: 0;
    margin-bottom: 0;
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

.customer-service-section h2 {
    text-align: center;
    margin-bottom: 20px;
}


.service-info {
    display: flex;
    flex-direction: column; /* 카드를 세로로 쌓음 */
    gap: 15px;
    margin-bottom: 20px;
}

.info-card {
    background: white;
    border: 1px solid #e3e6ea;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.info-card h3 {
    font-size: 1.1rem; /* 폰트 크기 축소 */
    margin-bottom: 10px;
    color: #333;
}

.phone-number,
.business-hours,
.lunch-hours {
    font-weight: bold;
    color: #ff6a00;
    margin: 5px 0;
}

.sub-text {
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* 견적문의 섹션 */
.inquiry-section {
    flex-grow: 1;
    background: white;
    border-radius: 0;
    box-shadow: none;
    min-width: 0;
    padding: 0;
}

/* 견적문의 제목 wrapper */
.inquiry-title-wrapper {
    display: block;
    width: calc(100% - 60px);
    margin-left: 30px;
    margin-right: 30px;
    border-bottom: 3px solid #ff6a00;
    padding-bottom: 15px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* 견적문의 큰 제목 스타일 (데스크톱) */
.inquiry-title-main {
    font-size: 2.5rem;
    text-align: left;
    color: #333;
    margin: 0;
    padding: 0;
}

.section-desc {
    text-align: left;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1rem;
    margin-left: 30px;
    margin-right: 30px;
}

.inquiry-form-container {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-left: 30px;
    margin-right: 30px;
    width: auto;
}

.inquiry-list-container {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-left: 30px;
    margin-right: 30px;
    width: auto;
}

.inquiry-form-container h3,
.inquiry-list-container h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.required {
    color: #dc3545;
}

.form-group input:not([type="checkbox"]),
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e3e6ea;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    background: #fafbfc;
}

.form-group input:focus:not([type="checkbox"]),
.form-group textarea:focus {
    border-color: #ff6a00;
    outline: none;
    background: #ffffff;
}

.form-actions {
    text-align: right;
    margin-top: 30px;
}

.submit-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    background: linear-gradient(135deg, #ff6a00 0%, #e55c00 100%);
    color: white;
    margin-right: 10px;
    box-shadow: 0 4px 12px rgba(255, 106, 0, 0.3);
}

.reset-btn {
    padding: 14px 32px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    background-color: #ffffff;
    color: #495057;
}

/* 문의 목록 */
#inquiry-list {
    min-height: 200px;
}

.loading-message {
    text-align: center;
    color: #999;
    padding: 40px;
}

/* 문의 항목 */
.inquiry-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: default;
}

.inquiry-item:last-child {
    margin-bottom: 0;
}

.inquiry-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 15px;
    margin-bottom: 0px;
    padding-bottom: 0px;
    border-bottom: none;
    cursor: pointer;
    align-content: center;
}

.inquiry-title {
    font-size: 1.1rem;
    font-weight: normal;
    color: #333;
    margin: 0;
    padding: 0;
    grid-column: 2;
    align-self: center;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.inquiry-item .inquiry-header h3 {
    font-size: 1.1rem;
    font-weight: normal;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.inquiry-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #666;
    grid-column: 3;
    justify-content: flex-end;
    align-items: center;
}

.inquiry-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
    grid-column: 1;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: fit-content;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.status-pending {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #5d4037;
}

.status-answered {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

/* 펼쳐지는 상세 내용 영역 스타일 */
.inquiry-details {
    padding: 20px 0 0 0;
    margin-top: 15px;
    border-top: 1px solid #e3e6ea;
}

.inquiry-content {
    color: #444;
    line-height: 1.8;
    margin: 15px 0;
    padding: 15px 20px;
    background: #ffffff;
    border-radius: 8px;
    border-left: 3px solid #ff6a00;
    white-space: pre-wrap;
    font-size: 1rem;
}

.inquiry-info {
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
    padding-left: 20px;
}

/* 답변 섹션 */
.reply-section {
    margin-top: 25px;
    padding-top: 0;
}

.reply-item {
    background: #e8f5e9;
    border: 1px solid #81c784;
    border-left: 4px solid #28a745;
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.1);
}

.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.reply-author {
    font-weight: bold;
    color: #ff6a00;
}

.reply-date {
    color: #999;
}

.reply-content {
    color: #555;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* 답변 작성 폼 */
.reply-form {
    margin-top: 15px;
}

.reply-form textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e3e6ea;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    resize: vertical;
    background: #fafbfc;
}

.reply-form textarea:focus {
    border-color: #28a745;
    outline: none;
    background: #ffffff;
}

.reply-form-actions {
    text-align: right;
    margin-top: 10px;
}

.reply-submit-btn,
.reply-cancel-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.reply-submit-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    margin-right: 10px;
}

.reply-cancel-btn {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

/* 답변 작성 버튼 스타일 */
.add-reply-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #ff6a00 0%, #e55c00 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 106, 0, 0.3);
}

/* 문의 액션 버튼 스타일 */
.inquiry-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.edit-inquiry-btn,
.delete-inquiry-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s;
}

.edit-inquiry-btn {
    background: linear-gradient(135deg, #ff6a00 0%, #e55c00 100%);
    color: white;
}
.edit-inquiry-btn:hover {
    background-color: #e55c00;
}

.delete-inquiry-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    display: none;
}


/* 문의 필터 링크 스타일 */

/* 모든 필터 링크의 기본 스타일 설정 (공통 뱃지 디자인) */
.inquiry-filter-link,
.inquiry-filter-link:visited {
    text-decoration: none;
    border-bottom: none !important;
    padding: 6px 14px;
    margin-left: 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
    line-height: 1.2;
    transition: all 0.2s ease-in-out;
    background-color: transparent;
    color: #333;
}

/* '내 문의 보기' 버튼이 비활성 상태 (view='all')일 때의 스타일 */
#my-inquiries-btn:not(.active-filter),
#my-inquiries-btn:not(.active-filter):visited {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(30, 136, 229, 0.2);
}

/* '내 문의 보기' 버튼이 활성 상태 (view='my')일 때의 스타일 */
#my-inquiries-btn.active-filter,
#my-inquiries-btn.active-filter:visited {
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.4);
}

/* 페이지네이션 버튼 스타일 */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination-container button {
    background-color: #ffffff;
    border: 2px solid #e3e6ea;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.pagination-container button.active {
    background: linear-gradient(135deg, #ff6a00 0%, #e55c00 100%);
    color: #fff;
    border-color: #ff6a00;
    font-weight: bold;
    cursor: default;
    box-shadow: 0 4px 12px rgba(255, 106, 0, 0.3);
}


/* 모바일 반응형 */
@media (max-width: 768px) {
    .contact-page {
        padding-top: 120px;
    }
    .contact-sections-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .customer-service-section {
        position: static;
        top: auto;
        align-self: auto;
        flex-basis: auto;
        width: 100%;
        padding: 20px;
        box-sizing: border-box;
    }

    /* 모바일에서는 고객센터 카드를 3열로 정렬 */
    .service-info {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .info-card {
        padding: 15px;
    }

    .phone-number,
    .business-hours,
    .lunch-hours {
        font-size: 1.3rem !important;
    }

    /* 견적 문의 섹션 제목 wrapper - 박스와 너비 맞춤 */
    .inquiry-title-wrapper {
        display: block;
        width: calc(100% - 40px);
        margin-left: 20px;
        margin-right: 20px;
        border-bottom: 3px solid #ff6a00;
        padding-bottom: 15px;
        margin-bottom: 15px;
        box-sizing: border-box;
    }

    /* 견적 문의 섹션 제목 - 중앙정렬 */
    .inquiry-title-main {
        text-align: center;
        font-size: 1.8rem;
        margin: 0;
        padding: 0;
    }

    .section-desc {
        text-align: center;
        margin-bottom: 25px;
    }

    .inquiry-section {
        padding-left: 0;
        padding-right: 0;
    }

    .inquiry-form-container,
    .inquiry-list-container {
        margin-left: 20px;
        margin-right: 20px;
        width: calc(100% - 40px);
        padding: 20px;
    }

    .section-desc {
        margin-left: 20px !important;
        margin-right: 20px !important;
        width: calc(100% - 40px) !important;
    }

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

    /* 수정/삭제 버튼 스타일 */
    .inquiry-actions {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #f0f0f0;
        text-align: right;
        display: flex;
        justify-content: flex-end;
        gap: 10px;
    }

    .edit-inquiry-btn,
    .delete-inquiry-btn {
        padding: 10px 20px;
        border: none;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .edit-inquiry-btn {
        background: linear-gradient(135deg, #ff6a00 0%, #e55c00 100%);
        color: white;
    }

    .delete-inquiry-btn {
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
        color: white;
        display: none;
    }

}

/* 모달 스타일 */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
}

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

#edit-inquiry-form {
    padding: 30px;
}

.help-text {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .contact-page {
        padding-top: 100px;
    }

    .customer-service-section h2 {
        font-size: 1.5rem;
    }

    .info-card h3 {
        font-size: 1.2rem;
    }

    .phone-number {
        font-size: 1.3rem;
    }

    .inquiry-form-section h2,
    .inquiry-list-section h2 {
        font-size: 1.5rem;
    }
}