/**
 * EV Cost Calculator Styles - Chinese (Traditional/Taiwan) Version
 * 電動汽車維護費計算器樣式 (雙欄佈局)
 *
 * @package Zipper
 */

/* ===== 雙欄佈局 (桌面端) ===== */
.evc-main-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    align-items: start;
}

.evc-input-col {
    position: sticky;
    top: 20px;
}

.evc-result-col {
    min-width: 0;
}

/* 範例資料按鈕 */
.evc-sample-btn {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #27ae60;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(39, 174, 96, 0.05) 100%);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.evc-sample-btn:hover {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.15) 0%, rgba(39, 174, 96, 0.08) 100%);
    border-color: rgba(39, 174, 96, 0.5);
}

.evc-sample-btn i {
    font-size: 14px;
}

/* 輸入區域 */
.evc-input-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    margin-bottom: 12px;
}

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

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

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

.evc-input-group label {
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
    display: flex;
    align-items: center;
    gap: 4px;
}

.evc-input-group label .unit {
    font-weight: 400;
    color: #a09a94;
}

.evc-input-group input,
.evc-input-group select {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

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

.evc-input-group input::placeholder {
    color: #a09a94;
}

.evc-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* 充電比例區域 */
.evc-charge-section {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    padding: 12px;
}

.evc-charge-title {
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.evc-charge-title i {
    color: #27ae60;
}

.evc-charge-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.evc-charge-row:last-child {
    margin-bottom: 0;
}

.evc-charge-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.evc-charge-item label {
    font-size: 11px;
    font-weight: 500;
    color: #5f5a56;
}

.evc-charge-item input {
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #e8e4dc;
    border-radius: 5px;
    background: #fff;
    color: #2d2a26;
    width: 100%;
}

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

.evc-charge-total {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e8e4dc;
    font-size: 12px;
    color: #5f5a56;
}

.evc-charge-total .total-value {
    font-weight: 600;
    color: #2d2a26;
}

.evc-charge-total .total-value.error {
    color: #e74c3c;
}

/* 其他費用區域 */
.evc-other-section {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    padding: 12px;
}

.evc-other-title {
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.evc-other-title i {
    color: #3498db;
}

.evc-other-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

/* 可選項目 */
.evc-optional-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e8e4dc;
}

.evc-optional-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.evc-optional-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1abc9c;
}

.evc-optional-checkbox label {
    font-size: 12px;
    font-weight: 500;
    color: #5f5a56;
    cursor: pointer;
}

.evc-optional-input {
    flex: 1;
}

.evc-optional-input input {
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #e8e4dc;
    border-radius: 5px;
    background: #fff;
    color: #2d2a26;
    width: 100%;
}

.evc-optional-input input:disabled {
    background: #f5f4f2;
    color: #a09a94;
    cursor: not-allowed;
}

.evc-optional-input input:focus {
    outline: none;
    border-color: #1abc9c;
    box-shadow: 0 0 0 2px rgba(26, 188, 156, 0.1);
}

.evc-optional-note {
    font-size: 11px;
    color: #a09a94;
    margin-top: 6px;
    padding-left: 22px;
}

/* 稅金減免說明 */
.evc-tax-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.08) 0%, rgba(39, 174, 96, 0.03) 100%);
    border: 1px solid rgba(39, 174, 96, 0.2);
    border-radius: 6px;
}

.evc-tax-info i {
    color: #27ae60;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

.evc-tax-info-text {
    font-size: 11px;
    color: #5f5a56;
    line-height: 1.5;
}

.evc-tax-info-text strong {
    color: #27ae60;
}

/* 計算按鈕 */
.evc-calc-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.evc-calc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.evc-calc-btn i {
    font-size: 16px;
}

/* 等待狀態 */
.evc-waiting {
    text-align: center;
    padding: 60px 20px;
    color: #a09a94;
    background: #faf9f7;
    border: 1px dashed #e8e4dc;
    border-radius: 10px;
}

.evc-waiting i {
    font-size: 56px;
    margin-bottom: 16px;
    display: block;
}

.evc-waiting p {
    font-size: 14px;
    line-height: 1.6;
}

/* ===== 結果區域 ===== */

/* 主結果卡片 */
.evc-main-result {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(184, 134, 11, 0.1) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.evc-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.evc-main-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 6px;
}

.evc-main-title i {
    color: #d4af37;
}

.evc-period-toggle {
    display: flex;
    gap: 4px;
    background: #fff;
    padding: 3px;
    border-radius: 6px;
    border: 1px solid #e8e4dc;
}

.evc-period-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #5f5a56;
    cursor: pointer;
    transition: all 0.2s;
}

.evc-period-btn.active {
    background: #d4af37;
    color: #fff;
}

.evc-total-box {
    text-align: center;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 16px;
}

.evc-total-value {
    font-size: 42px;
    font-weight: 700;
    color: #d4af37;
    line-height: 1;
    margin-bottom: 4px;
}

.evc-total-value .unit {
    font-size: 18px;
    font-weight: 500;
    color: #b8860b;
}

.evc-total-label {
    font-size: 13px;
    color: #5f5a56;
}

/* 費用項目網格 */
.evc-cost-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.evc-cost-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fff;
    border-radius: 6px;
}

.evc-cost-item.highlight {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.08) 0%, rgba(39, 174, 96, 0.03) 100%);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.evc-cost-item.optional {
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.05) 0%, rgba(26, 188, 156, 0.02) 100%);
    border: 1px solid rgba(26, 188, 156, 0.15);
}

.evc-cost-label {
    font-size: 12px;
    color: #5f5a56;
    display: flex;
    align-items: center;
    gap: 6px;
}

.evc-cost-label i {
    color: #d4af37;
    font-size: 14px;
}

.evc-cost-item.highlight .evc-cost-label i {
    color: #27ae60;
}

.evc-cost-item.optional .evc-cost-label i {
    color: #1abc9c;
}

.evc-cost-badge {
    font-size: 9px;
    padding: 2px 4px;
    background: rgba(26, 188, 156, 0.15);
    color: #1abc9c;
    border-radius: 3px;
    margin-left: 4px;
}

.evc-cost-value {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
}

.evc-cost-item.highlight .evc-cost-value {
    color: #27ae60;
}

.evc-cost-item.optional .evc-cost-value {
    color: #1abc9c;
}

/* 圖表區域 */
.evc-charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.evc-chart-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    padding: 16px;
}

.evc-chart-title {
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.evc-chart-container {
    position: relative;
    height: 200px;
}

/* 圓餅圖 (CSS實現) */
.evc-pie-chart {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(
        #27ae60 0deg 0deg,
        #f1c40f 0deg 0deg,
        #e74c3c 0deg 0deg,
        #9b59b6 0deg 360deg
    );
}

.evc-pie-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.evc-pie-center .value {
    font-size: 16px;
    font-weight: 700;
    color: #2d2a26;
}

.evc-pie-center .label {
    font-size: 10px;
    color: #5f5a56;
}

/* 圓餅圖圖例 */
.evc-pie-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.evc-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #5f5a56;
}

.evc-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.evc-legend-dot.charging {
    background: #27ae60;
}

.evc-legend-dot.insurance {
    background: #f1c40f;
}

.evc-legend-dot.maintenance {
    background: #e74c3c;
}

.evc-legend-dot.tire {
    background: #9b59b6;
}

.evc-legend-dot.parking {
    background: #1abc9c;
}

/* 柱狀圖 */
.evc-line-chart {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.evc-line-chart-area {
    flex: 1;
    position: relative;
    border-left: 1px solid #e8e4dc;
    border-bottom: 1px solid #e8e4dc;
    padding: 10px 10px 20px 40px;
}

.evc-line-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100%;
    gap: 6px;
}

.evc-line-bar {
    flex: 1;
    background: linear-gradient(180deg, #d4af37 0%, #b8860b 100%);
    border-radius: 3px 3px 0 0;
    position: relative;
    min-height: 10px;
    max-width: 50px;
    transition: height 0.3s ease;
}

.evc-line-bar:hover {
    opacity: 0.9;
}

.evc-line-bar .bar-label {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #a09a94;
    white-space: nowrap;
}

.evc-line-bar .bar-value {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 600;
    color: #2d2a26;
    white-space: nowrap;
}

.evc-y-axis {
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.evc-y-label {
    font-size: 9px;
    color: #a09a94;
    text-align: right;
    padding-right: 4px;
}

/* 充電費詳情 */
.evc-charge-detail {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.evc-charge-detail-title {
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.evc-charge-detail-title i {
    color: #27ae60;
}

.evc-charge-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.evc-charge-detail-item {
    text-align: center;
    padding: 12px;
    background: #faf9f7;
    border-radius: 8px;
}

.evc-charge-detail-item .type {
    font-size: 11px;
    font-weight: 500;
    color: #5f5a56;
    margin-bottom: 4px;
}

.evc-charge-detail-item .amount {
    font-size: 16px;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 2px;
}

.evc-charge-detail-item .kwh {
    font-size: 10px;
    color: #a09a94;
}

/* 提示區域 */
.evc-tips-section {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.08) 0%, rgba(52, 152, 219, 0.03) 100%);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.evc-tips-title {
    font-size: 13px;
    font-weight: 600;
    color: #3498db;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.evc-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.evc-tips-list li {
    font-size: 12px;
    color: #5f5a56;
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    border-bottom: 1px solid rgba(52, 152, 219, 0.15);
}

.evc-tips-list li:last-child {
    border-bottom: none;
}

.evc-tips-list li::before {
    content: '\f26a';
    font-family: 'bootstrap-icons';
    position: absolute;
    left: 0;
    color: #3498db;
    font-size: 10px;
}

/* 免責聲明 */
.evc-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: rgba(108, 117, 125, 0.08);
    border-radius: 8px;
    margin-top: 16px;
}

.evc-disclaimer i {
    color: #6c757d;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.evc-disclaimer-text {
    font-size: 12px;
    color: #5f5a56;
    line-height: 1.5;
}

.evc-disclaimer-text strong {
    color: #2d2a26;
}

/* 隱藏 */
.evc-hidden {
    display: none !important;
}

/* ===== 響應式 - 平板 ===== */
@media (max-width: 900px) {
    .evc-main-layout {
        grid-template-columns: 300px 1fr;
        gap: 16px;
    }

    .evc-charts-section {
        grid-template-columns: 1fr;
    }

    .evc-charge-detail-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== 響應式 - 手機 ===== */
@media (max-width: 768px) {
    .evc-main-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .evc-input-col {
        position: static;
    }

    .evc-input-section {
        padding: 14px;
    }

    .evc-charge-row {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px;
    }

    .evc-other-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px;
    }

    .evc-main-result {
        padding: 16px;
    }

    .evc-total-value {
        font-size: 36px;
    }

    .evc-cost-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .evc-charts-section {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .evc-chart-container {
        height: 180px;
    }

    .evc-charge-detail-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

/* ===== 響應式 - 小螢幕手機 ===== */
@media (max-width: 480px) {
    .evc-input-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .evc-charge-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .evc-other-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .evc-total-value {
        font-size: 32px;
    }

    .evc-total-value .unit {
        font-size: 14px;
    }

    .evc-main-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .evc-charge-detail-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .evc-charge-detail-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .evc-charge-detail-item .type {
        margin-bottom: 0;
    }

    .evc-charge-detail-item .amount {
        margin-bottom: 0;
    }

    .evc-charge-detail-item .kwh {
        display: none;
    }

    .evc-pie-chart {
        width: 140px;
        height: 140px;
    }

    .evc-pie-center {
        width: 80px;
        height: 80px;
    }

    .evc-pie-center .value {
        font-size: 14px;
    }

    .evc-chart-container {
        height: 160px;
    }

    .evc-optional-item {
        flex-wrap: wrap;
    }

    .evc-optional-input {
        width: 100%;
        flex: none;
        margin-top: 6px;
    }

    .evc-line-chart-area {
        padding-left: 35px;
    }
}
