/**
 * Transit Tax Deduction Calculator Styles
 * 대중교통 소득공제 계산기 전용 스타일
 *
 * @package Zipper
 */

/* ========================================
   2컬럼 레이아웃 (넓은 화면)
   ======================================== */

.transit-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}

.transit-layout-input {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.transit-layout-result {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 2컬럼 레이아웃 내부 요소 마진 재조정 */
.transit-layout .transit-input-card,
.transit-layout .transit-result,
.transit-layout .transit-refund-section,
.transit-layout .transit-strategy-section {
    margin-bottom: 0;
}

/* ========================================
   메인 섹션
   ======================================== */

.transit-section {
    margin-bottom: 32px;
}

.transit-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transit-section-title i {
    color: #d4af37;
}

/* ========================================
   모드 선택 탭
   ======================================== */

.transit-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.transit-mode-btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #5f5a56;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.transit-mode-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.transit-mode-btn.active {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    border-color: transparent;
    color: #fff;
}

.transit-mode-btn i {
    font-size: 16px;
}

/* ========================================
   입력 카드
   ======================================== */

.transit-input-card {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 1.5rem;
}

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

.transit-input-title {
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transit-input-title i {
    color: #d4af37;
}

/* 입력 필드 그룹 */
.transit-input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.transit-input-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.transit-input-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.transit-input-item label {
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
}

.transit-input-item .input-help {
    font-size: 11px;
    color: #8a857f;
    margin-top: 2px;
}

.transit-input-item input,
.transit-input-item select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #fff;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.transit-input-item input::placeholder {
    color: #b0aba5;
}

/* 금액 입력 (원 단위 표시) */
.transit-amount-wrapper {
    position: relative;
}

.transit-amount-wrapper input {
    padding-right: 40px;
    text-align: right;
}

.transit-amount-unit {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #5f5a56;
    pointer-events: none;
}

/* ========================================
   월별 입력 (접이식)
   ======================================== */

.transit-monthly-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e8e4dc;
}

.transit-monthly-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #5f5a56;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}

.transit-monthly-toggle:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.transit-monthly-toggle.active {
    background: rgba(212, 175, 55, 0.1);
    border-color: #d4af37;
    color: #d4af37;
}

.transit-monthly-toggle i {
    transition: transform 0.3s;
}

.transit-monthly-toggle.active i {
    transform: rotate(180deg);
}

.transit-monthly-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
    display: none;
}

.transit-monthly-grid.show {
    display: grid;
}

.transit-month-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transit-month-item label {
    font-size: 12px;
    font-weight: 500;
    color: #5f5a56;
    text-align: center;
}

.transit-month-item input {
    width: 100%;
    padding: 10px 8px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    background: #fff;
    color: #2d2a26;
    text-align: right;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.transit-monthly-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    margin-top: 12px;
}

.transit-monthly-total-label {
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
}

.transit-monthly-total-value {
    font-size: 16px;
    font-weight: 700;
    color: #d4af37;
}

/* ========================================
   결과 영역
   ======================================== */

.transit-result {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(184, 134, 11, 0.08) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 1.5rem;
}

.transit-result-main {
    text-align: center;
    margin-bottom: 20px;
}

.transit-result-label {
    font-size: 14px;
    color: #5f5a56;
    margin-bottom: 8px;
}

.transit-result-value {
    font-size: 42px;
    font-weight: 700;
    color: #d4af37;
    line-height: 1.2;
}

.transit-result-value .unit {
    font-size: 18px;
    font-weight: 500;
    color: #5f5a56;
}

.transit-result-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(212, 175, 55, 0.2);
    color: #b8860b;
    border-radius: 20px;
    margin-top: 8px;
}

/* 결과 세부 정보 */
.transit-result-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.transit-result-item {
    text-align: center;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
}

.transit-result-item .label {
    font-size: 12px;
    color: #5f5a56;
    margin-bottom: 6px;
}

.transit-result-item .value {
    font-size: 18px;
    font-weight: 600;
    color: #2d2a26;
}

.transit-result-item .value.highlight {
    color: #d4af37;
}

.transit-result-item .value .small-unit {
    font-size: 12px;
    font-weight: 500;
    color: #5f5a56;
}

/* ========================================
   절세 효과 (환급 예상액)
   ======================================== */

.transit-refund-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 1.5rem;
}

.transit-refund-title {
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transit-refund-title i {
    color: #d4af37;
}

.transit-refund-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.transit-refund-item {
    padding: 16px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s;
}

.transit-refund-item.active {
    background: rgba(212, 175, 55, 0.1);
    border-color: #d4af37;
}

.transit-refund-rate {
    font-size: 12px;
    color: #5f5a56;
    margin-bottom: 4px;
}

.transit-refund-value {
    font-size: 18px;
    font-weight: 700;
    color: #d4af37;
}

.transit-refund-note {
    font-size: 11px;
    color: #8a857f;
    margin-top: 4px;
}

/* ========================================
   전략 추천
   ======================================== */

.transit-strategy-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 1.5rem;
}

.transit-strategy-title {
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transit-strategy-title i {
    color: #d4af37;
}

.transit-strategy-card {
    padding: 16px;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.08) 0%, rgba(32, 134, 55, 0.08) 100%);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 12px;
    margin-bottom: 12px;
}

.transit-strategy-card.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.08) 0%, rgba(204, 154, 6, 0.08) 100%);
    border-color: rgba(255, 193, 7, 0.3);
}

.transit-strategy-card.info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.08) 0%, rgba(18, 130, 147, 0.08) 100%);
    border-color: rgba(23, 162, 184, 0.3);
}

.transit-strategy-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.transit-strategy-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 167, 69, 0.15);
    border-radius: 8px;
    color: #28a745;
    font-size: 18px;
}

.transit-strategy-card.warning .transit-strategy-icon {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.transit-strategy-card.info .transit-strategy-icon {
    background: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
}

.transit-strategy-label {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
}

.transit-strategy-content {
    font-size: 14px;
    color: #5f5a56;
    line-height: 1.6;
}

.transit-strategy-content strong {
    color: #2d2a26;
    font-weight: 600;
}

.transit-strategy-amount {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(212, 175, 55, 0.15);
    border-radius: 4px;
    color: #b8860b;
    font-weight: 600;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* ========================================
   공제 기준 안내
   ======================================== */

.transit-info-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 1.5rem;
}

.transit-info-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transit-info-title i {
    color: #d4af37;
}

.transit-info-table {
    width: 100%;
    border-collapse: collapse;
}

.transit-info-table th,
.transit-info-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #e8e4dc;
    font-size: 14px;
}

.transit-info-table th {
    background: #faf9f7;
    font-weight: 600;
    color: #2d2a26;
}

.transit-info-table td {
    color: #5f5a56;
}

.transit-info-table tr:last-child td {
    border-bottom: none;
}

.transit-info-table .highlight {
    color: #d4af37;
    font-weight: 600;
}

/* ========================================
   진행률 바
   ======================================== */

.transit-progress-section {
    margin-top: 20px;
}

.transit-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.transit-progress-label {
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
}

.transit-progress-value {
    font-size: 13px;
    font-weight: 600;
    color: #d4af37;
}

.transit-progress-bar {
    height: 8px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.transit-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37 0%, #b8860b 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ========================================
   아이콘 버튼
   ======================================== */

.tool-section .tool-btn.tool-btn-icon {
    background: transparent;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    padding: 6px 8px;
    color: #5f5a56;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-section .tool-btn.tool-btn-icon:hover {
    background: #fff;
    border-color: #d4af37;
    color: #d4af37;
}

/* ========================================
   반응형
   ======================================== */

/* 태블릿/중간 화면: 2컬럼 → 1컬럼 전환 */
@media (max-width: 1024px) {
    .transit-layout {
        grid-template-columns: 1fr;
    }

    .transit-layout-result {
        position: static;
    }
}

@media (max-width: 768px) {
    .transit-mode-tabs {
        flex-direction: column;
    }

    .transit-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .transit-monthly-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .transit-result-details {
        grid-template-columns: 1fr;
    }

    .transit-refund-grid {
        grid-template-columns: 1fr;
    }

    .transit-result-value {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .transit-input-card {
        padding: 16px;
    }

    .transit-monthly-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .transit-result {
        padding: 16px;
    }

    .transit-result-value {
        font-size: 28px;
    }

    .transit-info-table th,
    .transit-info-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
}
