/**
 * Single Parent Family Support Eligibility Calculator Styles
 * 한부모가족 지원금 자격 계산기
 *
 * @package Zipper
 */

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

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

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

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

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

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

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

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

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

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

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

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

.spf-select,
.spf-input {
    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;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

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

.spf-input-wrap {
    position: relative;
}

.spf-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #9a9488;
    pointer-events: none;
}

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

.spf-hint {
    margin-top: 6px;
    margin-bottom: 0;
    font-size: 11px;
    line-height: 1.5;
    color: #8f897f;
}

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

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

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

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

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

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

.spf-waiting {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
    color: #7f755f;
    font-size: 13px;
    line-height: 1.5;
}

.spf-waiting i {
    color: #d4af37;
    font-size: 32px;
    opacity: 0.4;
}

.spf-waiting p {
    margin: 0;
}

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

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

.spf-summary-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d2a26;
}

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

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

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

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

.spf-summary-label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #867f71;
}

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

.spf-summary-item:nth-child(2) .spf-summary-value {
    font-size: 22px;
    color: #b58913;
}

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

.spf-block-sub {
    font-size: 12px;
    color: #8f897f;
    margin-top: 2px;
}

.spf-download-btn {
    font-size: 13px;
    padding: 10px 14px;
    min-height: 42px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(63, 153, 98, 0.28);
}

.spf-download-btn:hover {
    box-shadow: 0 4px 12px rgba(54, 137, 86, 0.34);
    transform: translateY(-1px);
}

#spfDownloadBtn.tool-btn.tool-btn-excel,
.spf-download-btn.tool-btn.tool-btn-excel {
    color: #fff;
    background: linear-gradient(135deg, #59ab79 0%, #4b9a69 100%);
    border: 1px solid #448e62;
}

#spfDownloadBtn.tool-btn.tool-btn-excel:hover,
.spf-download-btn.tool-btn.tool-btn-excel:hover {
    background: linear-gradient(135deg, #4f9f70 0%, #438f62 100%);
}

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

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

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

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

.spf-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

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

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

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

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

.spf-table-note {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #8f897f;
}

.spf-pass {
    color: #2f855a;
    font-weight: 700;
}

.spf-fail {
    color: #c56c38;
    font-weight: 700;
}

.spf-apply-hint {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #6d6659;
}

.spf-apply-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spf-apply-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #8a6a10;
    text-decoration: none;
}

.spf-apply-link:hover {
    color: #6f530a;
    text-decoration: underline;
}

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

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

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

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

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

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

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

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

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

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

    .spf-download-btn {
        width: 100%;
        justify-content: center;
    }
}

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

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

    .spf-main-value {
        font-size: 27px;
    }

    .spf-table {
        min-width: 640px;
    }

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

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

    .spf-summary-item:nth-child(2) .spf-summary-value {
        font-size: 19px;
    }
}

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

    .spf-btn-primary:hover {
        transform: none;
    }
}
