/**
 * Business vs Corp Tax Comparison Calculator Styles
 * 개인사업자 vs 법인 세금 비교 계산기 전용 스타일
 *
 * @package Zipper
 */

/* ===== 2컬럼 레이아웃 (데스크탑) ===== */
.bct-main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
}

.bct-input-col {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bct-result-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== 탭 바 ===== */
.bct-tab-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #f5f3f0;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    padding: 4px;
}

.bct-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #7a756d;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.bct-tab-btn:hover {
    color: #2d2a26;
    background: rgba(255, 255, 255, 0.6);
}

.bct-tab-btn.active {
    color: #2d2a26;
    font-weight: 600;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.bct-tab-btn i {
    font-size: 14px;
}

.bct-tab-btn.active i {
    color: #d4af37;
}

/* ===== 탭 결과 래퍼 ===== */
.bct-tab-result {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== 탭 콘텐츠 래퍼 ===== */
.bct-tab-content {
    display: block;
}

/* ===== 공통 섹션 ===== */
.bct-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    transition: box-shadow 0.2s ease;
}

.bct-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

.bct-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bct-section-title i {
    color: #d4af37;
    font-size: 15px;
}

/* ===== 탭 내부 섹션 간격 (Rule 44) ===== */
.bct-tab-content .bct-section + .bct-section {
    margin-top: 14px;
}

.bct-tab-content .bct-btn-group {
    margin-top: 14px;
}

/* ===== 입력 그룹 ===== */
.bct-input-group {
    margin-bottom: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

.bct-input-group:last-child {
    margin-bottom: 0;
}

.bct-input-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #5f5a56;
    margin-bottom: 6px;
}

.bct-input-label .bct-label-hint {
    font-weight: 400;
    color: #9e9a96;
    margin-left: 4px;
}

.bct-amount-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 600;
    text-align: right;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bct-amount-input:hover {
    border-color: #d4c67a;
}

.bct-amount-input:focus {
    outline: none;
    border-color: #d4af37;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.bct-amount-input::placeholder {
    font-weight: 400;
    color: #c4c0bc;
}

.bct-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%235f5a56' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.bct-select:hover {
    border-color: #d4c67a;
}

.bct-select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.bct-korean-amount {
    font-size: 11px;
    color: #d4af37;
    margin-top: 4px;
    text-align: right;
    min-height: 16px;
}

.bct-hint {
    font-size: 11px;
    color: #9e9a96;
    margin-top: 4px;
}

.bct-number-input {
    width: 70px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bct-number-input:hover {
    border-color: #d4c67a;
}

.bct-number-input:focus {
    outline: none;
    border-color: #d4af37;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.bct-inline-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bct-inline-group .bct-input-label {
    margin-bottom: 0;
    white-space: nowrap;
}

.bct-inline-group .bct-unit {
    font-size: 12px;
    color: #5f5a56;
    white-space: nowrap;
}

/* ===== 라디오 버튼 ===== */
.bct-radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bct-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 12px;
    color: #5f5a56;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    background: #faf9f7;
    cursor: pointer;
    transition: all 0.2s;
}

.bct-radio-label:hover {
    border-color: #d4af37;
}

.bct-radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #d4af37;
    flex-shrink: 0;
}

/* ===== 경비율 표시 ===== */
.bct-expense-rate-display {
    font-size: 12px;
    color: #7a756d;
    padding: 8px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    text-align: center;
}

/* ===== 체크박스 ===== */
.bct-checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.bct-checkbox-row:last-child {
    margin-bottom: 0;
}

.bct-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 12px;
    color: #5f5a56;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    background: #faf9f7;
    cursor: pointer;
    transition: all 0.2s;
}

.bct-checkbox-label:hover {
    border-color: #d4af37;
}

.bct-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #d4af37;
    flex-shrink: 0;
}

.bct-checkbox-label.active {
    border-color: #d4af37;
    background: #fdfbf5;
    color: #2d2a26;
    font-weight: 500;
}

/* ===== 버튼 ===== */
.bct-btn-group {
    display: flex;
    gap: 8px;
}

.bct-calculate-btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #d4af37, #c9a030);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

.bct-calculate-btn:hover {
    background: linear-gradient(135deg, #c9a030, #b8922a);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.bct-reset-btn {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    background: #f5f3f0;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.bct-reset-btn:hover {
    background: #eae7e3;
}

/* ===== 결과 - 대기 영역 ===== */
.bct-waiting {
    text-align: center;
    padding: 40px 20px;
    color: #9e9a96;
}

.bct-waiting i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    color: #d4af37;
    opacity: 0.4;
}

.bct-waiting p {
    font-size: 13px;
    margin: 0;
}

/* ===== 결과 - 비교 요약 카드 ===== */
.bct-compare-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.bct-summary-card {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 2px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.08);
}

.bct-summary-card.bct-winner {
    border-color: #d4af37;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.15);
}

.bct-summary-card-icon {
    font-size: 24px;
    color: #d4af37;
    margin-bottom: 8px;
}

.bct-summary-card-label {
    font-size: 12px;
    color: #7a756d;
    margin-bottom: 6px;
}

.bct-summary-card-amount {
    font-size: 26px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.bct-summary-card-sub {
    font-size: 11px;
    color: #9e9a96;
}

.bct-winner-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #d4af37;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    margin-top: 8px;
}

/* ===== 결과 - 절감액 배너 ===== */
.bct-savings-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 2px solid #d4af37;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.12);
}

.bct-savings-icon {
    font-size: 28px;
    color: #d4af37;
    flex-shrink: 0;
}

.bct-savings-text {
    flex: 1;
}

.bct-savings-label {
    font-size: 12px;
    color: #7a756d;
    margin-bottom: 4px;
}

.bct-savings-amount {
    font-size: 24px;
    font-weight: 700;
    color: #d4af37;
    letter-spacing: -0.02em;
}

.bct-savings-desc {
    font-size: 11px;
    color: #9e9a96;
    margin-top: 2px;
}

/* ===== 결과 - 보험료/연금 비교 카드 ===== */
.bct-insurance-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bct-ins-card {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.bct-ins-card-title {
    font-size: 11px;
    font-weight: 600;
    color: #7a756d;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.bct-ins-card-title i {
    color: #d4af37;
    font-size: 12px;
}

.bct-ins-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
}

.bct-ins-row + .bct-ins-row {
    border-top: 1px solid #f0ede8;
}

.bct-ins-row-label {
    color: #7a756d;
}

.bct-ins-row-value {
    font-weight: 600;
    color: #2d2a26;
}

.bct-ins-diff {
    text-align: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e8e4dc;
    font-size: 12px;
    font-weight: 600;
    color: #27ae60;
}

.bct-ins-diff.bct-loss {
    color: #e74c3c;
}

/* ===== 결과 - 상세 비교표 ===== */
.bct-detail-table-wrap {
    overflow-x: auto;
}

.bct-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bct-detail-table thead th {
    padding: 10px 12px;
    background: #faf9f7;
    border-bottom: 2px solid #e8e4dc;
    font-weight: 600;
    color: #5f5a56;
    text-align: center;
}

.bct-detail-table thead th:first-child {
    text-align: left;
}

.bct-detail-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0ede8;
    text-align: right;
    color: #2d2a26;
}

.bct-detail-table tbody td:first-child {
    text-align: left;
    color: #5f5a56;
    font-weight: 500;
}

.bct-detail-table tbody tr:hover td {
    background: #faf9f7;
}

.bct-detail-table tbody tr:last-child td {
    border-bottom: 2px solid #e8e4dc;
    font-weight: 700;
    color: #d4af37;
    background: #fdfbf5;
}

.bct-detail-table .bct-cell-highlight {
    color: #27ae60;
    font-weight: 600;
}

/* ===== 결과 - 차트 영역 ===== */
.bct-chart-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.bct-chart-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bct-chart-title i {
    color: #d4af37;
}

.bct-chart-wrap {
    position: relative;
    width: 100%;
    height: 280px;
}

.bct-chart-wrap canvas {
    max-height: 280px;
}

/* ===== 슬라이더 ===== */
.bct-slider-display {
    margin-bottom: 8px;
}

.bct-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #5f5a56;
    margin-bottom: 8px;
}

.bct-slider-labels strong {
    color: #d4af37;
    font-weight: 700;
}

.bct-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #d4af37 0%, #e8e4dc 100%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.bct-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #d4af37;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.bct-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #d4af37;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.bct-slider-amounts {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #7a756d;
    margin-top: 6px;
}

.bct-slider-amounts strong {
    color: #2d2a26;
    font-weight: 600;
}

/* ===== 손익분기점 배너 ===== */
.bct-breakeven-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f0f7ff;
    border: 1px solid #bdd8f5;
    border-radius: 10px;
    font-size: 13px;
    color: #2d6ab1;
    font-weight: 500;
}

.bct-breakeven-banner i {
    font-size: 16px;
    color: #3498db;
    flex-shrink: 0;
}

/* ===== Tab2 총 세금 표시 ===== */
.bct-tab2-total-display {
    text-align: center;
    padding: 16px 0;
}

.bct-tab2-total-amount {
    font-size: 32px;
    font-weight: 700;
    color: #d4af37;
    letter-spacing: -0.02em;
}

.bct-tab2-optimal {
    text-align: center;
    font-size: 13px;
    color: #27ae60;
    font-weight: 500;
    padding: 10px 14px;
    background: #f0faf3;
    border: 1px solid #c3e6cd;
    border-radius: 8px;
    margin-top: 10px;
}

/* ===== 2컬럼 상세 테이블 ===== */
.bct-detail-table-2col thead th:last-child,
.bct-detail-table-2col tbody td:last-child {
    text-align: right;
}

/* ===== 엑셀 다운로드 버튼 ===== */
.bct-schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.bct-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: #217346;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.bct-download-btn:hover {
    background: #1a5c38;
}

/* ===== 면책 조항 ===== */
.bct-disclaimer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    font-size: 11px;
    color: #9e9a96;
    line-height: 1.5;
}

.bct-disclaimer i {
    color: #d4af37;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ===== 유틸리티 ===== */
.bct-hidden {
    display: none !important;
}

/* ===== 모션 감소 접근성 ===== */
@media (prefers-reduced-motion: reduce) {
    .bct-section,
    .bct-amount-input,
    .bct-number-input,
    .bct-select,
    .bct-calculate-btn,
    .bct-tab-btn {
        transition: none !important;
    }
    .bct-section:hover,
    .bct-calculate-btn:hover {
        transform: none !important;
    }
}

/* ===== 반응형 ===== */
@media (max-width: 900px) {
    .bct-main-layout {
        grid-template-columns: 1fr;
    }

    .bct-input-col {
        position: static;
        width: 100%;
    }

    .bct-result-col {
        width: 100%;
    }

    .bct-input-group input:not([type="radio"]):not([type="checkbox"]):not([type="range"]),
    .bct-input-group select {
        width: 100% !important;
        max-width: 100% !important;
    }

    .bct-compare-summary {
        grid-template-columns: 1fr;
    }

    .bct-insurance-compare {
        grid-template-columns: 1fr;
    }

    .bct-summary-card-amount {
        font-size: 22px;
    }

    .bct-tab2-total-amount {
        font-size: 26px;
    }

    .bct-detail-table {
        font-size: 12px;
    }

    .bct-detail-table thead th,
    .bct-detail-table tbody td {
        padding: 8px 8px;
    }
}

@media (max-width: 480px) {
    .bct-section {
        padding: 12px;
    }

    .bct-tab-bar {
        gap: 4px;
        padding: 3px;
    }

    .bct-tab-btn {
        padding: 8px 8px;
        font-size: 12px;
    }

    .bct-summary-card {
        padding: 14px;
    }

    .bct-savings-banner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 14px;
    }

    .bct-savings-amount {
        font-size: 20px;
    }

    .bct-breakeven-banner {
        font-size: 12px;
        padding: 10px 12px;
    }

    .bct-inline-group {
        flex-wrap: wrap;
    }

    .bct-number-input {
        width: 60px;
    }

    .bct-tab2-total-amount {
        font-size: 22px;
    }
}

/* Excel button guard */
.tool-btn-excel {
  background: #59ab79;
  border-color: #59ab79;
}

.tool-btn-excel:hover,
.tool-btn-excel:focus-visible {
  background: #4f9f70;
  border-color: #4f9f70;
}

