/**
 * Early Reemployment Allowance Calculator Styles
 * 조기재취업수당 계산기
 *
 * @package Zipper
 */

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

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

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

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

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

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

.era-section-title,
.era-block-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #4d473c;
}

.era-block-title {
    margin-bottom: 0;
}

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

.era-block-sub {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: #7b7568;
}

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

.era-input-group {
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.era-input-group input:not([type="checkbox"]):not([type="radio"]),
.era-input-group select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    font-size: 13px;
    padding: 10px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.era-input {
    font-variant-numeric: tabular-nums;
}

.era-strict-control {
    accent-color: #b38b2f;
}

.era-input-group input:not([type="checkbox"]):not([type="radio"]):hover,
.era-input-group select:hover {
    border-color: #d4c67a;
}

.era-input-group input:not([type="checkbox"]):not([type="radio"]):focus,
.era-input-group select:focus {
    outline: none;
    background: #fff;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

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

.era-korean-amount {
    min-height: 16px;
    font-size: 11px;
    color: #d4af37;
    text-align: right;
}

.era-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #8a8478;
}

.era-mode-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

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

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

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

.era-mode-label.active {
    border-color: #d4af37;
    background: #fff8e8;
    box-shadow: 0 1px 4px rgba(212, 175, 55, 0.2);
}

.era-mode-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #544c40;
    line-height: 1.45;
}

.era-mode-text strong {
    font-size: 13px;
}

.era-mode-text small {
    font-size: 11px;
    color: #7c7468;
}

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

.era-check-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid #ece7dd;
    border-radius: 8px;
    background: #fcfbf8;
    font-size: 12px;
    line-height: 1.5;
    color: #5f5a56;
}

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

.era-check-label.era-disabled {
    opacity: 0.65;
    background: #f6f3ed;
}

.era-strict-box {
    margin-top: 12px;
    padding: 11px;
    border-radius: 10px;
    border: 1px dashed #dbcfae;
    background: #fffbf1;
}

.era-strict-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #7b6328;
}

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

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

.era-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);
}

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

.era-btn-ghost {
    color: #5f5a56;
    border: 1px solid #e8e4dc;
    background: #f5f3f0;
}

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

.era-waiting {
    text-align: center;
    padding: 40px 20px;
    color: #9e9a96;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.era-waiting-icon {
    font-size: 32px;
    color: #d4af37;
    opacity: 0.6;
}

.era-waiting-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d2a26;
}

.era-waiting-desc {
    font-size: 13px;
    margin: 0;
}

.era-date-notice {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e4dac0;
    background: #fffbf1;
    font-size: 13px;
    line-height: 1.6;
    color: #544c3f;
}

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

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

.era-summary-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
    color: #2d2a26;
}

.era-summary-note {
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #726b5f;
}

.era-formula {
    margin: 0 0 12px;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px dashed #d9caa2;
    background: #fffaf0;
    font-size: 12px;
    color: #6d5929;
}

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

.era-summary-item {
    border: 1px solid #e7ddc4;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

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

.era-kpi-item .era-summary-value {
    font-size: 22px;
    color: #b58913;
    letter-spacing: -0.02em;
}

.era-status-pass {
    border-color: #9bc8ab;
    background: #f4fbf6;
}

.era-status-pass .era-summary-value {
    color: #2f6b4e;
}

.era-status-fail {
    border-color: #e5b4b4;
    background: #fff7f7;
}

.era-status-fail .era-summary-value {
    color: #a63d3d;
}

.era-status-warn {
    border-color: #e8c37a;
    background: #fffaf1;
}

.era-status-warn .era-summary-value {
    color: #9d6d1f;
}

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

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

.era-chart-fallback {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px dashed #d7ccb4;
    border-radius: 8px;
    background: #faf8f3;
    font-size: 12px;
    line-height: 1.5;
    color: #7a7266;
}

.era-fallback-table-wrap {
    margin-top: 10px;
    border: 1px solid #ece5d7;
    border-radius: 8px;
    overflow: hidden;
}

.era-fallback-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.era-fallback-table th,
.era-fallback-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #efe8dc;
    text-align: left;
}

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

.era-fallback-table tr:last-child td {
    border-bottom: none;
}

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

.era-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 740px;
}

.era-table thead th {
    background: #f6f3ed;
    border-bottom: 1px solid #e5dece;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 700;
    padding: 10px 9px;
    text-align: left;
    white-space: nowrap;
}

.era-table td {
    border-bottom: 1px solid #efe9db;
    color: #3f3a34;
    font-size: 12px;
    line-height: 1.5;
    padding: 10px 9px;
    vertical-align: top;
}

.era-empty-row td {
    text-align: center !important;
    color: #827a6d;
}

.era-judge-pass {
    color: #2f6b4e;
    font-weight: 700;
}

.era-judge-fail {
    color: #a63d3d;
    font-weight: 700;
}

.era-judge-warn {
    color: #9d6d1f;
    font-weight: 700;
}

.era-judge-info {
    color: #5f5a56;
    font-weight: 600;
}

#eraDownloadBtn.tool-btn.tool-btn-excel,
.era-download-btn.tool-btn.tool-btn-excel {
    padding: 7px 12px;
    min-height: 34px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    color: #fff;
    background: linear-gradient(135deg, #59ab79 0%, #4b9a69 100%);
    border: 1px solid #448e62;
    box-shadow: 0 2px 6px rgba(72, 146, 103, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#eraDownloadBtn.tool-btn.tool-btn-excel:hover,
.era-download-btn.tool-btn.tool-btn-excel:hover {
    background: linear-gradient(135deg, #4f9f70 0%, #438f62 100%);
    box-shadow: 0 4px 12px rgba(67, 133, 93, 0.34);
    transform: translateY(-1px);
}

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

.era-apply-list a {
    color: #2d5f8b;
    text-decoration: underline;
    word-break: break-all;
}

.era-apply-note {
    margin: 10px 0 0;
    color: #7c7568;
    font-size: 12px;
    line-height: 1.5;
}

.era-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #6c6458;
    font-size: 12px;
    line-height: 1.5;
    background: #fffcf6;
}

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

@media (max-width: 900px) {
    .era-main-layout {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 100%;
        overflow: hidden;
    }

    .era-input-col {
        position: static;
        top: auto;
        max-width: 100%;
        overflow: hidden;
    }

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

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

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

    .era-input-row {
        grid-template-columns: 1fr;
    }

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

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

    .era-chart-wrap {
        height: 240px;
    }

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

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

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

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

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

    .era-table {
        min-width: 620px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .era-section,
    .era-result-summary,
    .era-chart-section,
    .era-table-section,
    .era-apply-section,
    .era-disclaimer,
    .era-btn,
    .era-download-btn,
    .era-mode-label,
    .era-input-group input,
    .era-input-group select {
        transition: none !important;
    }

    .era-btn:hover,
    .era-download-btn:hover {
        transform: none !important;
    }
}
