/* ====================================================
   무기 · 방어구 추가옵션표 (bonus_stat_table.css)
   ==================================================== */
.bst-container { max-width: 1100px; margin: 0 auto; padding: 40px 20px 80px; }
.bst-header { text-align: center; margin-bottom: 22px; }
.bst-header h1 { font-size: 28px; color: #3C3744; margin: 0 0 8px; }
.bst-sub { color: #666; font-size: 14px; margin: 0; }

/* ============ 최상위 탭 (무기/방어구) ============ */
.bst-main-tab-bar {
    display: flex; gap: 8px;
    margin-bottom: 18px;
}
.bst-main-tab {
    flex: 1;
    background: #fff;
    border: 2px solid #e6e8ef;
    padding: 14px 18px;
    font-size: 15px; font-weight: 700;
    color: #666; cursor: pointer;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.bst-main-tab-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    image-rendering: -webkit-optimize-contrast;
}
.bst-main-tab:hover:not(.active) {
    background: #fafbfd;
    border-color: #d4d8e2;
    color: #3C3744;
}
.bst-main-tab.active {
    background: #fff7e6;
    border-color: #f39c12;
    color: #b8720a;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.15);
}
.bst-main-panel { display: none; }
.bst-main-panel.active { display: block; }

/* ============ 티어 탭 ============ */
.bst-tab-bar {
    display: flex; gap: 6px;
    background: #f4f5f9;
    padding: 6px;
    border-radius: 10px;
    margin-bottom: 12px;
}
.bst-tab {
    flex: 1; background: transparent; border: 0;
    padding: 12px 14px;
    font-size: 14px; font-weight: 700;
    color: #888; cursor: pointer;
    border-radius: 7px;
    transition: background 0.12s, color 0.12s;
}
.bst-tab:hover:not(.active) { background: rgba(255,255,255,0.7); color: #3C3744; }
.bst-tab.active {
    background: #fff; color: #3C3744;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ============ 직업군 탭 ============ */
.bst-subtab-bar {
    display: flex; gap: 4px; flex-wrap: wrap;
    margin-bottom: 16px;
}
.bst-subtab {
    flex: 1; min-width: 90px;
    background: #fff; border: 1px solid #e6e8ef;
    padding: 8px 10px;
    font-size: 13px; font-weight: 600;
    color: #666; cursor: pointer;
    border-radius: 8px;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.bst-subtab:hover:not(.active) { background: #fafbfd; color: #3C3744; }
.bst-subtab.active {
    background: #fff7e6;
    border-color: #ffd68c;
    color: #b8720a;
}
.bst-subtab.bst-subtab-hidden { display: none; }

/* ============ 검색 & 옵션 바 ============ */
.bst-control-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    margin-bottom: 14px;
}
.bst-search-wrap {
    position: relative; flex: 1; min-width: 200px; max-width: 400px;
}
.bst-search {
    width: 100%; box-sizing: border-box;
    padding: 9px 30px 9px 14px;
    border: 1px solid #d4d8e2;
    border-radius: 8px;
    font-size: 13px; color: #3C3744;
    background: #fff;
}
.bst-search:focus {
    outline: none;
    border-color: #B4C5E4;
    box-shadow: 0 0 0 2px rgba(180,197,228,0.25);
}
.bst-clear-btn {
    position: absolute; right: 6px; top: 50%;
    transform: translateY(-50%);
    background: none; border: 0;
    color: #aaa; cursor: pointer;
    font-size: 18px; line-height: 1;
    padding: 2px 6px;
    display: none;
}
.bst-clear-btn:hover { color: #f39c12; }
.bst-search-wrap.has-value .bst-clear-btn { display: block; }

.bst-view-toggle {
    display: flex; align-items: center;
}
.bst-check-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: #666;
    cursor: pointer; user-select: none;
}
.bst-check-label input {
    width: 15px; height: 15px;
    accent-color: #f39c12;
    cursor: pointer;
}

/* ============ 테이블 ============ */
.bst-table-wrapper {
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 12px;
    padding: 18px;
    overflow-x: auto;
}
.bst-tier-section + .bst-tier-section { margin-top: 24px; }
.bst-tier-title {
    font-size: 16px; font-weight: 800;
    color: #3C3744; margin: 0 0 10px;
    padding-left: 10px;
    border-left: 4px solid #f39c12;
}
.bst-job-section + .bst-job-section { margin-top: 20px; }
.bst-job-title {
    font-size: 14px; font-weight: 700;
    color: #666; margin: 0 0 8px;
    padding: 6px 10px;
    background: #f8f9fb;
    border-radius: 6px;
}
.bst-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 560px;
}
.bst-table thead th {
    background: #f4f5f9;
    color: #3C3744;
    font-weight: 700;
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #e6e8ef;
    font-size: 12px;
}
.bst-table thead th.bst-col-name { text-align: left; padding-left: 14px; }
.bst-table thead th.bst-col-1cha { color: #e74c3c; }
.bst-table thead th.bst-col-2cha { color: #3498db; }

.bst-table tbody tr {
    border-bottom: 1px solid #f0f2f7;
    transition: background 0.1s;
}
.bst-table tbody tr:last-child { border-bottom: 0; }
.bst-table tbody tr:hover { background: #fafbfd; }
.bst-table tbody tr.bst-highlight {
    background: #fff7e6;
}

.bst-table td {
    padding: 9px 8px;
    text-align: center;
    color: #3C3744;
    vertical-align: middle;
}
.bst-table td.bst-cell-name {
    text-align: left; padding-left: 14px;
    font-weight: 600;
    min-width: 220px;
}
.bst-name-wrap {
    display: flex; align-items: center; gap: 10px;
}
.bst-weapon-icon {
    width: 32px; height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    image-rendering: -webkit-optimize-contrast;
}
.bst-dual-icons {
    display: flex; gap: 2px;
    flex-shrink: 0;
}
.bst-weapon-icon-dual {
    width: 24px; height: 24px;
}
.bst-name-text {
    line-height: 1.4;
    min-width: 0;
}
.bst-weapon-type {
    font-size: 11px; color: #888; font-weight: 500;
    margin-left: 4px;
}
.bst-table td.bst-cell-1 {
    color: #e74c3c; font-weight: 800; font-size: 14px;
}
.bst-table td.bst-cell-2 {
    color: #3498db; font-weight: 700;
}

.bst-highlight-mark {
    display: inline-block;
    padding: 0 3px;
    background: #fff2c2;
    border-radius: 3px;
}

/* ============ 빈 결과 ============ */
.bst-empty {
    text-align: center;
    padding: 50px 20px;
    color: #888;
}
.bst-empty-icon { font-size: 40px; margin-bottom: 10px; }
.bst-empty p { font-size: 14px; margin: 0; }

/* ============ 각주 ============ */
.bst-disclaimer {
    font-size: 11px; color: #888;
    margin: 16px 0 0; line-height: 1.7;
    text-align: center;
}

/* ============ 방어구: 안내 / 컨트롤 ============ */
.bst-armor-info {
    background: #fff7e6;
    border: 1px solid #ffe0a3;
    border-radius: 8px;
    padding: 12px 16px;
    color: #b8720a;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 16px;
}
.bst-armor-info b { color: #8a5205; }

.bst-armor-controls {
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
    display: flex; flex-direction: column;
    gap: 14px;
}

.bst-armor-level-row {
    display: flex; align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.bst-armor-level-label {
    font-size: 14px; font-weight: 700;
    color: #3C3744;
    min-width: 140px;
}
.bst-armor-level-value {
    display: inline-block;
    min-width: 40px;
    padding: 2px 10px;
    background: #f39c12;
    color: #fff;
    border-radius: 6px;
    font-size: 15px;
    text-align: center;
    margin-left: 4px;
}
.bst-armor-slider {
    flex: 1;
    min-width: 200px;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #f4f5f9 0%, #e6e8ef 100%);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}
.bst-armor-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px; height: 20px;
    background: #f39c12;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
}
.bst-armor-slider::-moz-range-thumb {
    width: 20px; height: 20px;
    background: #f39c12;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
}

.bst-armor-presets {
    display: flex; align-items: center;
    gap: 6px; flex-wrap: wrap;
}
.bst-armor-preset-label {
    font-size: 13px; color: #666; font-weight: 600;
    margin-right: 4px;
}
.bst-armor-preset {
    background: #f4f5f9;
    border: 1px solid #e6e8ef;
    color: #3C3744;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px; font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.bst-armor-preset:hover:not(.active) {
    background: #e8eaf2;
}
.bst-armor-preset.active {
    background: #f39c12;
    border-color: #f39c12;
    color: #fff;
}

.bst-armor-options {
    display: flex; align-items: center;
    gap: 20px; flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px dashed #eef0f5;
}
.bst-armor-job-wrap {
    display: flex; align-items: center; gap: 8px;
}
.bst-armor-job-wrap label {
    font-size: 13px; color: #666; font-weight: 600;
}
.bst-armor-job-select {
    padding: 6px 10px;
    border: 1px solid #d4d8e2;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: #3C3744;
    cursor: pointer;
}
.bst-armor-job-select:focus {
    outline: none;
    border-color: #B4C5E4;
    box-shadow: 0 0 0 2px rgba(180,197,228,0.25);
}

/* ============ 방어구: 결과 표 ============ */
.bst-armor-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 480px;
}
.bst-armor-table thead th {
    background: #f4f5f9;
    color: #3C3744;
    font-weight: 700;
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #e6e8ef;
    font-size: 12px;
}
.bst-armor-table thead th.bst-armor-opt-col {
    text-align: left; padding-left: 16px;
}
.bst-armor-group-row td {
    background: #fafbfd;
    color: #666;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 16px;
    letter-spacing: 0.02em;
    border-bottom: 1px solid #eef0f5;
    text-transform: uppercase;
}
.bst-armor-row {
    border-bottom: 1px solid #f0f2f7;
    transition: background 0.1s;
}
.bst-armor-row:hover { background: #fafbfd; }
.bst-armor-row td {
    padding: 10px 8px;
    text-align: center;
    color: #3C3744;
    font-weight: 500;
}
.bst-armor-row td.bst-armor-opt-cell {
    text-align: left; padding-left: 16px;
    font-weight: 700;
}
.bst-armor-row-highlight {
    background: #fff7e6 !important;
}
.bst-armor-row-highlight td.bst-armor-opt-cell {
    color: #b8720a;
}
.bst-armor-row-highlight td.bst-cell-1 {
    color: #c0392b;
}

/* ============ 반응형 ============ */
@media (max-width: 700px) {
    .bst-container { padding: 24px 12px 60px; }
    .bst-header h1 { font-size: 22px; }
    .bst-main-tab { font-size: 13px; padding: 11px 12px; }
    .bst-main-tab-icon { width: 18px; height: 18px; }
    .bst-tab { font-size: 12px; padding: 10px 8px; }
    .bst-subtab { font-size: 12px; padding: 7px 8px; min-width: 60px; }
    .bst-table-wrapper { padding: 10px; }
    .bst-table { font-size: 12px; min-width: 500px; }
    .bst-table td.bst-cell-name { min-width: 160px; padding-left: 8px; font-size: 12px; }
    .bst-table td.bst-cell-1 { font-size: 13px; }
    .bst-weapon-type { display: block; margin-left: 0; margin-top: 2px; }
    .bst-control-bar { gap: 8px; }
    .bst-search-wrap { max-width: none; }
    /* 방어구 반응형 */
    .bst-armor-level-label { min-width: auto; width: 100%; }
    .bst-armor-slider { min-width: 100%; }
    .bst-armor-options { gap: 12px; flex-direction: column; align-items: flex-start; }
    .bst-armor-table { font-size: 12px; min-width: 420px; }
    .bst-armor-preset { font-size: 11px; padding: 5px 9px; }
}
