/* QnA Page Styles */
.qna-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
}

/* QnA Header */
.qna-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    margin-top: 20px;
}

.qna-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.qna-write-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;   
    transition: all 0.3s ease;
}

/* QnA Category Menu */
.qna-category-menu {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.qna-category-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #f5f5f5;
    color: #33333380;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.qna-category-item-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #f6f5ff;
    color: #462cc5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
    transition: all 0.3s ease;
}

* QnA Search */
.qna-search {
    margin-bottom: 24px;
}

.qna-search-form {
    position: relative;
    display: flex;
    gap: 8px;
}

.qna-search-input {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid #f6f5ff;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.qna-search-input:focus {
    outline: none;
    border: 1px solid #7d65f2;
}

.qna-search-btn {
    padding: 10px 16px;    
    color: #7d65f2;    
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f6f5ff;
}

.qna-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
    margin-top: 4px;
    display: none;
}

.qna-search-results.show {
    display: block;
}

.qna-search-result-item {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.qna-search-result-item:hover {
    background: #f8f9fa;
    text-decoration: none;
}

.qna-search-result-item:last-child {
    border-bottom: none;
}

/* QnA Category Info */
.qna-category-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 20px;
}

.qna-category-info-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qna-category-info-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.qna-category-info-count {
    font-size: 14px;
    color: #33333380;
}

.qna-category-highlight {
    font-size: 14px;
    font-weight: 600;
}

.qna-sort-menu {
    display: flex;
    gap: 16px;
}

.qna-sort-btn {    
    color: #33333380;
    padding: 4px 0;
    text-decoration: none;    
    font-size: 14px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}


.qna-sort-btn.active {    
    color: #462cc5;
    border-bottom-color: #462cc5;
    font-weight: 600;
}

/* QnA Table */
.qna-table-container {
    background: #fff;    
    overflow: hidden;
    
}

.qna-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.qna-table thead {
    background: #f8f9fa;
}

.qna-table th {
    padding: 12px;    
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
}

.qna-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.qna-table tbody tr {
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.qna-table tbody tr.secret-row {
    background: #f8f9fa;
    cursor: default;
}

.qna-title-cell {
    width: 60%;
}

.qna-author-cell {
    width: 15%;
    font-size: 14px;
}

.qna-date-cell {
    width: 15%;
    font-size: 14px;
}

.qna-views-cell {
    width: 10%;
    text-align: center;
    font-size: 14px;
}

.qna-title-link {
    color: #333;
    text-decoration: none;
    display: block;
}

.qna-title-text {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.qna-title-meta {
    display: none;
    font-size: 12px;
    color: #33333380;
    margin-top: 4px;
}

.qna-badge-new {
    display: inline-block;
    background: #ff4757;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.qna-comment-count {
    display: inline-block;
    color: #666;
    font-size: 12px;
    margin-left: 8px;
}

.qna-category-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.qna-category-badge.phone {
    background: #e3f2fd;
    color: #1976d2;
}

.qna-category-badge.internet {
    background: #e8f5e8;
    color: #388e3c;
}

.qna-category-badge.rental {
    background: #e1f5fe;
    color: #0288d1;
}

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

.qna-secret-icon {
    color: #888;
    margin-right: 6px;
}

.qna-secret-text {
    color: #888;
    font-size: 0.9em;
}

/* QnA Pagination */
.qna-pagination-container {
    display: flex;
    justify-content: center;
    padding: 70px;
}

.qna-pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.qna-pagination-item {
    display: flex;
}

.qna-pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    color: #33333380;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;    
    border-radius: 8px;
    transition: all 0.3s ease;
}

.qna-pagination-item.active .qna-pagination-link {
    background: #f6f5ff;
    color: #7d65f2;
}

.qna-pagination-item.disabled .qna-pagination-link {
    background: #f5f5f5;
    color: #ccc;
    border-color: #e0e0e0;
    cursor: not-allowed;
}
/* QnA Banner */
.qna-banner-section {
    margin: 40px 0;
}

.qna-banner-image {
    width: 100%;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* Floating Write Button */
.qna-floating-write-btn {
    display: none;    
}

.qna-floating-write-btn:hover {
    background: #3d24a8;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(70, 44, 197, 0.4);
}

/* QnA Form Page Styles (Write/Edit) */
.qna-form-page {
    max-width: 768px;
    margin: 0 auto;
    padding: 40px 20px;
}

.qna-form-card {
    background: #fff;     
    overflow: hidden;
}

.qna-form-card-body {
    padding: 24px 0 0;
}

.qna-form-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin: 0 0 12px 0;
}

.qna-form-divider {
    height: 1px;
    background: #eee;
    border: none;    
    margin: 0 0 16px 0;
}

.qna-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qna-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qna-form-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.qna-form-input,
.qna-form-select,
.qna-form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    
}

.qna-form-input:focus,
.qna-form-select:focus,
.qna-form-textarea:focus {
    outline: none;
    border-color: #462cc5;
}

.qna-form-textarea {
    min-height: 200px;
    resize: vertical;
}

.qna-form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.qna-form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #7d65f2;
}

.qna-form-checkbox label {
    font-size: 14px;
    color: #33333380;
    cursor: pointer;
}

.qna-form-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.qna-form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;  
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 12px;

}

/* QnA Detail Page Styles */
.qna-detail-page {
    max-width: 768px;
    margin: 0 auto;
    padding: 40px 20px 10px;
}

.qna-detail-breadcrumb {
    margin-bottom: 12px;
}

.qna-detail-breadcrumb-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
    align-items: center;
    font-size: 14px;
}

.qna-detail-breadcrumb-item {
    display: flex;
    align-items: center;
}

.qna-detail-breadcrumb-item:not(:last-child)::after {
    content: '>';
    margin-left: 8px;
    color: #33333380;
}

.qna-detail-breadcrumb-link {
    color: #33333380;
    text-decoration: none;
    font-size: 14px;
}

.qna-detail-breadcrumb-active {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.qna-detail-card {
    background: #fff;
    overflow: hidden;
    margin-bottom: 40px;
}

.qna-detail-card-body {
    padding: 0;
}

.qna-detail-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.qna-detail-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    margin: 0 0 4px 0;
    word-break: break-word;
}

.qna-detail-author {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin: 0 0 8px 0;
}

.qna-detail-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    color: #33333380;
}

.qna-detail-content {
    line-height: 1.7;
    color: #333;
    word-break: break-word;
    overflow-wrap: break-word;
    margin-bottom: 24px;
    letter-spacing: -0.42px;
}

.qna-detail-content p {
    margin: 0 0 16px 0;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.qna-detail-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.qna-detail-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;  
    transition: all 0.3s ease;    
}

.qna-detail-edit-actions {
    display: flex;
    gap: 1px;
}

.qna-detail-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;   
    transition: all 0.3s ease;
}

.qna-detail-delete-btn {
    display: inline-flex;
    align-items: center;   
    cursor: pointer;
    transition: all 0.3s ease;
}

/* QnA Comments Section */
.qna-detail-comments {
    padding: 40px 20px 70px;
    max-width: 768px;    
}

.qna-detail-comments-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
}

.qna-detail-comments-count {
    color: #462cc5;
}

.qna-detail-comment-item {
    background: #fff;        
    padding: 20px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #f6f5ff;
}

.qna-detail-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.qna-detail-comment-author {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.qna-detail-comment-date {
    font-size: 12px;
    color: #666;
}

.qna-detail-comment-content {
    color: #333;
    line-height: 1.6;
    margin-bottom: 12px;
}

.qna-detail-comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.qna-detail-comment-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qna-detail-comment-edit {
    background: none;
    color: #33333380;
}

.qna-detail-comment-delete {
    background: none;
    color: #33333380;
}

.qna-detail-comment-form {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.qna-detail-comment-form-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
}

.qna-detail-comment-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    margin-bottom: 12px;
}

.qna-detail-comment-textarea:focus {
    outline: none;
    border-color: #462cc5;
}

.qna-detail-comment-secret {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.qna-detail-comment-secret input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #462cc5;
}

.qna-detail-comment-secret label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.qna-detail-comment-submit {    
    cursor: pointer;
    transition: all 0.3s ease;
}

.qna-detail-empty-comments {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Responsive Design for QnA */
@media (max-width: 768px) {
    .qna-page,
    .qna-form-page,
    .qna-detail-page {
        padding: 30px 20px 10px;
    }
    .qna-pagination-container {
        padding: 40px;
    }
    
    .qna-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .qna-title {
        font-size: 20px;
    }
    
    .qna-category-menu {
        gap: 5px;
        margin-bottom: 20px;
    }
    
    .qna-category-item,
    .qna-category-item-pill {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .qna-category-info {        
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 4px;
    }
    .qna-table-container {
        overflow-x: auto;
    }
    
    .qna-table {
        min-width: 600px;
    }
    
    .qna-table th,
    .qna-table td {
        padding: 12px 6px;
    }
    
    .qna-author-cell,
    .qna-date-cell {
        display: none;
    }
    
    .qna-title-meta {
        display: block;
    }
    
    .qna-form-card-body {
        padding: 0;
    }
    
    .qna-form-title {
        font-size: 24px;
    }
    
    .qna-form-input,
    .qna-form-select,
    .qna-form-textarea {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .qna-form-btn {
        padding: 10px 20px;
        font-size: 15px;
    }
    
    .qna-detail-title {
        font-size: 18px;
    }
    
    .qna-detail-actions {
        /*
        flex-direction: column;
        gap: 16px;
        align-items: stretch;*/
    }
    
    .qna-detail-edit-actions {
        justify-content: center;
    }
    
    .qna-detail-comment-item {
        padding: 16px 0;
    }
    
    .qna-detail-comment-form {
        padding: 16px;
    }
    
    .qna-floating-write-btn {
        position: fixed;
        bottom: 130px;
        right: 20px;
        width: 50px;
        height: 50px;
        background: #7d65f2;
        color: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        box-shadow: 0 4px 12px #462cc50f;
        transition: all 0.3s ease, bottom 0.2s ease;
        z-index: 100;
    }

    .qna-write-btn {
        display: none;
    }
    .qna-table thead {
        display: none;
    }

    .qna-views-cell {
        display: none;
    }

    .qna-pagination-link {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .qna-detail-comments {
        padding: 40px 20px 50px;
    }

    .qna-sort-btn {
        font-size: 12px;
    }
}
