/**
 * Education Benefit Support Calculator Styles
 * 교육급여·교육비 지원 계산기
 *
 * @package Zipper
 */

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

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

.ebs-input-col {
    position: sticky;
    top: 20px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.ebs-section,
.ebs-result-summary,
.ebs-card-section,
.ebs-chart-section,
.ebs-table-section,
.ebs-apply-section {
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

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

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

.ebs-input-group {
    margin-bottom: 12px;
}

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

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

.ebs-select,
.ebs-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    background: #fbfaf8;
    color: #2d2a26;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.ebs-select {
    padding: 10px 32px 10px 12px;
    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='%236f6758' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.ebs-input {
    padding: 10px 12px;
    text-align: right;
    font-weight: 600;
}

input[type="number"].ebs-input {
    padding-right: 12px;
}

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

.ebs-select:hover,
.ebs-input:hover {
    border-color: #d4c67a;
}

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

.ebs-amount-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.ebs-amount-wrap .ebs-input {
    min-width: 0;
    padding-right: 12px;
}

.ebs-unit {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 0 12px;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #9a9488;
    background: #fbfaf8;
    white-space: nowrap;
    pointer-events: none;
}

.ebs-amount-wrap .ebs-input:hover + .ebs-unit {
    background: #fff;
    border-color: #d4c67a;
}

.ebs-amount-wrap .ebs-input:focus + .ebs-unit {
    background: #fff;
    border-color: #d4af37;
}

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

.ebs-hint {
    margin-top: 5px;
    margin-bottom: 0;
    font-size: 11px;
    line-height: 1.45;
    color: #8f897f;
}

.ebs-grid-3,
.ebs-grid-2 {
    display: grid;
    gap: 10px;
}

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

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

.ebs-radio-group {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

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

.ebs-radio-label.active {
    border-color: #d4af37;
    background: #fff9ea;
    color: #4b432f;
}

.ebs-radio-label input[type="radio"] {
    margin: 0;
    width: auto;
}

.ebs-checklist-section {
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.ebs-checklist {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: #5f5a56;
}

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

.ebs-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;
}

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

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

.ebs-btn-ghost {
    color: #5f5a56;
    border: 1px solid #dfd8cb;
    background: #f5f3ef;
}

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

.ebs-waiting {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    color: #7f755f;
    font-size: 13px;
    line-height: 1.5;
}

.ebs-waiting i {
    color: #d4af37;
    font-size: 18px;
    flex-shrink: 0;
}

.ebs-waiting p {
    margin: 0;
}

.ebs-result-summary {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
}

.ebs-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;
}

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

.ebs-main-value {
    margin-top: 8px;
    margin-bottom: 10px;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #b58913;
}

.ebs-summary-note {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1.5;
    color: #7f786b;
}

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

.ebs-summary-item {
    border: 1px solid #e7ddc4;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
}

.ebs-summary-label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    color: #867f71;
}

.ebs-summary-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: #2f2b24;
}

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

.ebs-card {
    border: 1px solid #ece7da;
    border-radius: 10px;
    padding: 12px;
    background: #fcfaf4;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ebs-card h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: #5f584c;
}

.ebs-card p {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #2d2a26;
}

.ebs-pill {
    display: inline-flex;
    align-self: flex-start;
    border-radius: 999px;
    padding: 4px 10px;
    background: #efe7d3;
    color: #6d5c2b;
    font-size: 11px;
    font-weight: 700;
}

.ebs-pill-pass {
    background: #dff3e6;
    color: #2c7a4b;
}

.ebs-pill-fail {
    background: #fde7da;
    color: #b45b2f;
}

.ebs-pill-warn {
    background: #f5eedc;
    color: #8b6e2f;
}

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

.ebs-block-sub {
    font-size: 12px;
    color: #8f897f;
}

.ebs-chart-wrap {
    position: relative;
    width: 100%;
    min-height: 260px;
    height: 260px;
}

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

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

#ebsDownloadBtn.tool-btn.tool-btn-excel,
.ebs-download-btn.tool-btn.tool-btn-excel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid #4f9f70;
    border-radius: 6px;
    min-height: 0;
    padding: 6px 12px;
    background: linear-gradient(135deg, #59ab79 0%, #4f9f70 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(63, 153, 98, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#ebsDownloadBtn.tool-btn.tool-btn-excel:hover,
.ebs-download-btn.tool-btn.tool-btn-excel:hover {
    background: linear-gradient(135deg, #4f9f70 0%, #458b63 100%);
    border-color: #458b63;
    box-shadow: 0 4px 12px rgba(54, 137, 86, 0.34);
    transform: translateY(-1px);
}

.ebs-table-wrap {
    width: 100%;
    overflow-x: auto;
}

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

.ebs-table th,
.ebs-table td {
    border: 1px solid #ece7da;
    padding: 10px 12px;
    font-size: 13px;
    color: #2d2a26;
    text-align: left;
    vertical-align: middle;
}

.ebs-table th {
    background: #f7f3e8;
    color: #5f584c;
    font-weight: 700;
}

.ebs-table td:last-child,
.ebs-table th:last-child {
    text-align: right;
}

.ebs-table tbody tr:nth-child(even) td {
    background: #fcfaf4;
}

.ebs-empty-row td {
    text-align: center !important;
    color: #8f897f;
}

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

.ebs-apply-list a {
    color: #2f6eb4;
    font-weight: 600;
    text-decoration: none;
}

.ebs-apply-list a:hover {
    text-decoration: underline;
}

.ebs-apply-note {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #7f786b;
}

.ebs-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #eadfbf;
    border-radius: 12px;
    background: #fffdf6;
    padding: 12px 14px;
    color: #7c7057;
    font-size: 12px;
    line-height: 1.55;
}

.ebs-disclaimer i {
    margin-top: 1px;
    flex-shrink: 0;
    color: #d4af37;
    font-size: 14px;
}

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

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

    .ebs-grid-3 {
        grid-template-columns: 1fr;
    }
}

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

    .ebs-grid-2 {
        grid-template-columns: 1fr;
    }

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

    .ebs-summary-grid,
    .ebs-card-grid {
        grid-template-columns: 1fr;
    }

    .ebs-main-value {
        font-size: 30px;
    }

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

    #ebsDownloadBtn.tool-btn.tool-btn-excel,
    .ebs-download-btn.tool-btn.tool-btn-excel {
        width: 100%;
    }

    .ebs-radio-group {
        flex-direction: column;
    }

    .ebs-amount-wrap {
        gap: 6px;
    }

    .ebs-unit {
        min-width: 34px;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .ebs-main-value {
        font-size: 27px;
    }

    .ebs-table {
        min-width: 440px;
    }

    .ebs-table th,
    .ebs-table td {
        font-size: 12px;
        padding: 9px 10px;
    }

    .ebs-amount-wrap {
        gap: 5px;
    }

    .ebs-unit {
        min-width: 32px;
        padding: 0 8px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ebs-select,
    .ebs-input,
    .ebs-btn,
    .ebs-download-btn.tool-btn.tool-btn-excel,
    .ebs-radio-label {
        transition: none;
    }
}
