/**
 * Energy Voucher Eligibility Support Calculator Styles
 * 에너지바우처 자격/지원금 계산기
 *
 * @package Zipper
 */

.evs-hidden {
    display: none !important;
}

.evs-main-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    align-items: start;
}

.evs-input-col {
    position: sticky;
    top: 20px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 100%;
    box-sizing: border-box;
}

.evs-result-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
    box-sizing: border-box;
}

.evs-section,
.evs-result-summary,
.evs-chart-section,
.evs-table-section,
.evs-apply-section {
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    max-width: 100%;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease;
}

.evs-section:hover,
.evs-result-summary:hover,
.evs-chart-section:hover,
.evs-table-section:hover,
.evs-apply-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

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

.evs-section-title i,
.evs-block-title i {
    color: #d4af37;
}

.evs-input-group {
    margin-bottom: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

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

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

.evs-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    background: #fbfaf8;
    color: #2d2a26;
    font-size: 13px;
    padding: 10px 34px 10px 12px;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    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='%236f6758' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

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

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

.evs-hint {
    margin: 6px 0 0;
    font-size: 11px;
    line-height: 1.45;
    color: #8f897f;
}

.evs-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.evs-check-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.evs-check-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.evs-mode-box {
    margin-bottom: 12px;
}

.evs-mode-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.evs-mode-label {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    background: #fbfaf8;
    padding: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.evs-mode-label input[type="radio"] {
    margin-top: 2px;
    width: auto;
    flex-shrink: 0;
}

.evs-mode-label.active {
    border-color: #d4af37;
    background: #fff9ea;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.08);
}

.evs-mode-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.evs-mode-text strong {
    font-size: 12px;
    font-weight: 700;
    color: #2d2a26;
    line-height: 1.35;
}

.evs-mode-text small {
    font-size: 11px;
    color: #7f786b;
    line-height: 1.4;
}

.evs-check-label {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    background: #fbfaf8;
    padding: 10px;
    font-size: 12px;
    line-height: 1.45;
    color: #5f5a56;
    min-height: 44px;
    box-sizing: border-box;
}

.evs-check-label input[type="checkbox"] {
    margin-top: 2px;
    width: auto;
    flex-shrink: 0;
}

.evs-check-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.evs-check-label-disabled {
    background: #f4f2ee;
    border-color: #e1dbcf;
}

.evs-check-label-disabled span {
    color: #9b948a;
}

.evs-reference-section {
    background: #fffdf7;
}

.evs-mini-table-wrap {
    overflow-x: auto;
}

.evs-mini-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 280px;
}

.evs-mini-table th,
.evs-mini-table td {
    border-bottom: 1px solid #eee8dc;
    padding: 8px 6px;
    font-size: 12px;
    text-align: center;
    color: #5f5a56;
}

.evs-mini-table th {
    color: #2d2a26;
    background: #faf6eb;
    font-weight: 700;
}

.evs-btn-group {
    display: flex;
    gap: 8px;
}

.evs-btn {
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.evs-btn-primary {
    flex: 1;
    color: #fff;
    background: linear-gradient(135deg, #d4af37 0%, #c49520 100%);
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

.evs-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.evs-btn-ghost {
    color: #5f5a56;
    background: #f5f3f0;
    border: 1px solid #e8e4dc;
    font-size: 13px;
    font-weight: 500;
}

.evs-btn-ghost:hover {
    background: #fff;
    border-color: #d4c67a;
}

.evs-waiting {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9e9a96;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
}

.evs-waiting i {
    font-size: 32px;
    color: #d4af37;
    opacity: 0.4;
    flex-shrink: 0;
}

.evs-waiting p {
    margin: 0;
}

.evs-result-summary {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.12);
}

.evs-summary-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.18);
    color: #7b6521;
    font-size: 12px;
    font-weight: 700;
}

.evs-summary-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 700;
    color: #2d2a26;
}

.evs-summary-note {
    margin: 8px 0 14px;
    font-size: 12px;
    line-height: 1.5;
    color: #7f786b;
}

.evs-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.evs-summary-item {
    border: 1px solid #e7ddc4;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    min-height: 88px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
}

.evs-summary-item.is-kpi {
    border-color: #d8c184;
}

.evs-summary-item.is-pass {
    border-color: #7bb489;
    background: #f2fbf4;
}

.evs-summary-item.is-fail {
    border-color: #de9a9a;
    background: #fff4f4;
}

.evs-summary-label {
    font-size: 12px;
    font-weight: 600;
    color: #6d665c;
}

.evs-summary-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: #2d2a26;
}

.evs-summary-item.is-kpi .evs-summary-value {
    font-size: 22px;
    color: #b58913;
}

.evs-block-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 10px;
}

.evs-block-sub {
    font-size: 11px;
    color: #8f897f;
}

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

.evs-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.evs-chart-fallback {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px dashed #d9cda8;
    border-radius: 8px;
    background: #fffcf2;
    font-size: 12px;
    color: #7f755f;
    line-height: 1.5;
}

.evs-chart-fallback-table-wrap {
    margin-top: 10px;
}

.evs-chart-fallback-table {
    width: 100%;
    border-collapse: collapse;
}

.evs-chart-fallback-table th,
.evs-chart-fallback-table td {
    border-bottom: 1px solid #eee8dc;
    padding: 8px 6px;
    font-size: 12px;
    color: #5f5a56;
}

.evs-chart-fallback-table th {
    background: #faf6eb;
    color: #2d2a26;
    font-weight: 700;
}

.evs-chart-fallback-table td:last-child,
.evs-chart-fallback-table th:last-child {
    text-align: right;
}

.evs-table-wrap {
    overflow-x: auto;
}

.evs-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.evs-table th,
.evs-table td {
    border-bottom: 1px solid #eee8dc;
    padding: 10px 8px;
    font-size: 12px;
    line-height: 1.45;
    color: #5f5a56;
    text-align: left;
    vertical-align: top;
}

.evs-table th {
    background: #faf6eb;
    color: #2d2a26;
    font-weight: 700;
}

.evs-table tbody tr:last-child td {
    border-bottom: none;
}

.evs-empty-row td {
    text-align: center;
    color: #8f897f;
    padding: 14px 8px;
}

.evs-apply-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.evs-apply-list a {
    color: #2f6fab;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.evs-apply-note {
    margin: 10px 0 0;
    font-size: 12px;
    color: #7f786b;
    line-height: 1.45;
}

.evs-disclaimer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    font-size: 11px;
    color: #9e9a96;
    line-height: 1.5;
}

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

@media (max-width: 900px) {
    .evs-main-layout {
        grid-template-columns: 1fr;
    }

    .evs-input-col {
        position: static;
        overflow: hidden;
    }

    .evs-result-col {
        overflow: hidden;
    }

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

    .evs-check-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .evs-section,
    .evs-result-summary,
    .evs-chart-section,
    .evs-table-section,
    .evs-apply-section {
        padding: 14px;
    }

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

    .evs-summary-value {
        font-size: 18px;
    }

    .evs-summary-item.is-kpi .evs-summary-value {
        font-size: 20px;
    }

    .evs-block-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .evs-mode-group {
        grid-template-columns: 1fr;
    }

    .evs-chart-wrap {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .evs-main-layout,
    .evs-input-col,
    .evs-result-col,
    .evs-section,
    .evs-result-summary,
    .evs-chart-section,
    .evs-table-section,
    .evs-apply-section {
        max-width: 100%;
        overflow-x: hidden;
    }

    .evs-check-grid,
    .evs-check-grid-3,
    .evs-summary-grid {
        grid-template-columns: 1fr;
    }

    .evs-btn-group {
        flex-direction: column;
    }

    .evs-btn {
        width: 100%;
    }

    .evs-summary-value {
        font-size: 16px;
    }

    .evs-summary-item.is-kpi .evs-summary-value {
        font-size: 19px;
    }

    .evs-chart-wrap {
        height: 220px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .evs-section,
    .evs-result-summary,
    .evs-chart-section,
    .evs-table-section,
    .evs-apply-section,
    .evs-btn,
    .evs-select {
        transition: none !important;
    }

    .evs-section:hover,
    .evs-result-summary:hover,
    .evs-chart-section:hover,
    .evs-table-section:hover,
    .evs-apply-section:hover,
    .evs-btn-primary:hover {
        transform: none !important;
    }
}
