
.inquiry-board {
    padding: 0 20px 32px 20px;
    max-width: 98%; /* Expanded from 1400px to use most of the screen */
    margin: 0 auto;
    margin-top: 36px; /* topbar height */
}

/* Sticky Header Wrapper */
.board-sticky-header {
    position: sticky;
    top: 36px;
    background: #fff;
    z-index: 1000;
    padding-top: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.notice-container {
    background: #fdfdfd;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 24px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.filter-section {
    display: flex;
    gap: 12px;
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.inquiry-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
}

.inquiry-table thead th {
    position: sticky;
    top: 310px; /* Adjust this value based on header height or use dynamic JS */
    background: #f8f9fa;
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid #eee;
    z-index: 900;
}

.inquiry-table td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 0; /* Necessary for text-overflow to work in table-cells with percentage or flex-like behavior */
}

/* Specific overrides for columns that need more or less space */
.inquiry-table td:nth-child(1) { max-width: 50px; }  /* No */
.inquiry-table td:nth-child(2) { max-width: 120px; } /* PM Type */
.inquiry-table td:nth-child(3) { max-width: 100px; } /* Env */
.inquiry-table td:nth-child(4) { max-width: 150px; } /* Category */
.inquiry-table td:nth-child(5) { max-width: 200px; } /* Project */
.inquiry-table td:nth-child(6) { max-width: 400px; } /* Content */
.inquiry-table td:nth-child(7) { max-width: 400px; } /* Reply */
.inquiry-table td:nth-child(8) { max-width: 100px; } /* Author */
.inquiry-table td:nth-child(9) { max-width: 120px; } /* Date */
.inquiry-table td:nth-child(10) { max-width: 100px; } /* Status */

/* Reset max-width for detail row to allow it to span full width */
.detail-row td {
    max-width: none;
    white-space: normal;
    overflow: visible;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

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

.status-working {
    background: #e3f2fd;
    color: #1565c0;
}

.status-checking {
    background: #fff3e0;
    color: #ef6c00;
}

.status-pending {
    background: #f5f5f5;
    color: #616161;
}

.inquiry-row:hover {
    background: #fcfcfc;
    cursor: pointer;
}

/* Expanded Row Highlight */
.inquiry-row.active-row {
    background-color: #f0f7f6 !important; /* Very light mint gray */
}

.inquiry-row.active-row td {
    font-weight: 600;
    color: #1e5149;
    border-bottom-color: transparent; /* Seamless connection with detail */
}

.content-preview {
    max-width: 500px; /* Increased from 300px */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Accordion Detail Row Style */
.detail-row {
    display: none;
    background: #fdfdfd;
}

.detail-row.active {
    display: table-row;
}

.detail-container {
    padding: 24px;
    border-left: 6px solid #1e5149;
    background: #f9fafb; /* Slightly different background for grouping */
    box-shadow: inset 0 4px 15px rgba(0,0,0,0.08);
    position: relative; /* For positioning the close button */
    border-bottom: 2px solid #eee;
}

.detail-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.btn-close-accordion {
    position: absolute;
    top: 35px;
    right: 45px;
    background: #eee;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    z-index: 10;
}

.btn-close-accordion:hover {
    background: #e0e0e0;
    color: #333;
}

.btn-close-accordion::after {
    content: "▲";
    font-size: 10px;
}

.detail-q-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.detail-a-section {
    background: #f1f8f7;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #1e5149;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.detail-label {
    font-weight: 700;
    color: #888;
    margin-right: 8px;
}

/* Reply Form Enhancement */
.reply-edit-form textarea {
    width: 100%;
    height: 120px; /* Fixed height */
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 15px;
    resize: none; /* Disable resizing */
    background: #fff;
    transition: all 0.2s;
}

.reply-edit-form textarea:disabled,
.reply-edit-form select:disabled,
.reply-edit-form input:disabled {
    background: #fcfcfc;
    color: #666;
    border-color: #eee;
    cursor: default;
}

.reply-edit-form.readonly .btn-save,
.reply-edit-form.readonly .btn-delete,
.reply-edit-form.readonly .btn-cancel {
    display: none;
}

.reply-edit-form.editable .btn-edit {
    display: none;
}

.reply-edit-form.editable textarea {
    border-color: #1e5149;
    box-shadow: 0 0 0 2px rgba(30, 81, 73, 0.1);
}
