/* /resource/www/css/board.css */

/* Board Tab Navigation */
.board-tabs-wrap {
    width: 100%;
    border-bottom: 2px solid #222;
    margin-bottom: 40px;
}

.board-tabs {
    display: flex;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 0;
}

.board-tab-item {
    flex: 1;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #757575;
    font-size: 18px;
    font-weight: 500;
    border: 1px solid #D3D3D3;
    border-bottom: none;
    background-color: #F9F9F9;
    transition: all 0.2s;
}

.board-tab-item.active {
    background-color: #FFF;
    color: #442c93;
    font-weight: 700;
    border-top: 3px solid #442c93;
    border-left: 1px solid #442c93;
    border-right: 1px solid #442c93;
    z-index: 1;
}

/* Reference Room List Style */
.ref-list-item {
    padding: 24px 38px;
    border-bottom: 1px solid #D3D3D3;
    background-color: #FFFFFF;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: background-color 0.2s;
}

.ref-list-item.is-attached {
    background-color: #ECF0F5;
}

.ref-list-item .item-title {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 22.5px;
    font-weight: 600;
    color: #010101;
    text-decoration: none;
}

.ref-list-item .item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ref-list-item .btn-download-icon {
    width: 50px;
    height: 50px;
    border: 1px solid #D5D5D5;
    background: #FFF url('/resource/www/images/figma/icons/download.svg') no-repeat center;
    background-size: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.ref-list-item .meta-txt {
    font-size: 15.5px;
    color: #757575;
    font-weight: 400;
    position: relative;
}

.ref-list-item .meta-txt + .meta-txt {
    padding-left: 13px;
}

.ref-list-item .meta-txt + .meta-txt::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 12px;
    background-color: #D3D3D3;
}

/* FAQ Accordion Style */
.faq-list-wrap {
    border-top: 1px solid #D3D3D3;
}

.faq-item {
    border-bottom: 1px solid #D3D3D3;
}

.faq-q {
    padding: 20px 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    background-color: #FFF;
}

.faq-q .q-icon {
    width: 40px;
    height: 40px;
    background-color: #442c93;
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22.5px;
    font-weight: 700;
    border-radius: 4px;
    margin-right: 20px;
}

.faq-q .q-title {
    flex: 1;
    font-size: 18.5px;
    font-weight: 600;
    color: #010101;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.faq-q .toggle-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #757575;
}

.faq-a {
    display: none;
    background-color: #F9F9F9;
    padding: 38px 78px;
    font-size: 15.5px;
    color: #010101;
    line-height: 1.6;
    font-weight: 500;
}

/* Accessibility Support */
.high-contrast .board-tab-item.active {
    background-color: #000;
    color: #FF0;
    border-color: #FF0;
}

.high-contrast .ref-list-item {
    background-color: #000;
    color: #FFF;
    border-color: #FFF;
}

.high-contrast .ref-list-item .item-title {
    color: #FF0;
}

.high-contrast .faq-q {
    background-color: #000;
    color: #FFF;
}

.high-contrast .faq-q .q-icon {
    background-color: #FF0;
    color: #000;
}

.high-contrast .faq-a {
    background-color: #222;
    color: #FFF;
}

/* Font Size Scaling */
.font-size-up .board-tab-item { font-size: 20px; }
.font-size-up .ref-list-item .item-title { font-size: 26px; }
.font-size-up .faq-q .q-title { font-size: 22px; }
.font-size-up .faq-a { font-size: 18px; }

/* Responsive Layout */
@media screen and (max-width: 1024px) {
    .board-tabs { padding: 0 10px; }
    .board-tab-item { font-size: 16px; height: 50px; }
    .faq-a { padding: 20px 40px; }
}

@media screen and (max-width: 480px) {
    .board-tabs { flex-wrap: wrap; }
    .board-tab-item { flex: 0 0 50%; height: 45px; font-size: 14px; }
    .ref-list-item .item-title { font-size: 18px; }
    .faq-q .q-title { font-size: 16px; }
}

/* Board Search Area (Utility) */
.board-search-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.board-total-count {
    font-size: 18px;
    color: #010101;
    font-weight: 500;
}

.board-total-count .count-num {
    font-weight: 700;
    color: #442c93; /* Primary Color */
}

.board-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.board-search-select {
    height: 40px;
    padding: 0 30px 0 15px;
    border: 1px solid #D5D5D5;
    border-radius: 4px;
    background: #fff url('/resource/www/images/common/arr_down.png') no-repeat right 10px center;
    background-size: 10px;
    appearance: none;
    -webkit-appearance: none;
    font-size: 15px;
    color: #555;
    min-width: 100px;
}

.board-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #D5D5D5;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    height: 40px;
    width: 250px;
}

.board-search-input {
    flex: 1;
    border: none;
    height: 100%;
    padding: 0 15px;
    font-size: 15px;
    outline: none;
}

.board-search-btn {
    width: 40px;
    height: 100%;
    border: none;
    background: url('/resource/www/images/figma/icons/search.svg') no-repeat center;
    background-size: 20px;
    cursor: pointer;
}

/* Pagination Customization (if overrides needed) */
.paging_wrap {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

/* Ensure pagination links look like design (simple numbers) */
.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 2px;
    font-size: 15px;
    color: #666;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination a.active,
.pagination a:hover {
    font-weight: 700;
    color: #fff;
    background-color: #000; 
}

/* High Contrast for new elements */
.high-contrast .board-search-select,
.high-contrast .board-search-input-wrap {
    background-color: #000;
    color: #fff;
    border-color: #fff;
}
.high-contrast .board-search-input {
    background-color: #000;
    color: #fff;
}
.high-contrast .board-search-btn {
    background-color: #FF0; /* Highlight button */
}
