/**
 * EV Cost Calculator Styles
 * 전기차 유지비 계산기 전용 스타일 (2컬럼 레이아웃)
 *
 * @package Zipper
 */

/* ===== 2컬럼 레이아웃 (데스크탑) ===== */
.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-input-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    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;
    gap: 8px;
}

/* 계산 버튼 */
.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: 12px;
}

.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: 12px;
    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-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-value {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
}

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

/* 차트 섹션 */
.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: 12px;
    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,
        #3498db 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.tax {
    background: #3498db;
}

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

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

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

/* 라인 차트 */
.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 30px;
}

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

.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: 40px;
    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: -16px;
    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: 12px;
    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: 12px;
    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;
        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;
    }
}
