/**
 * Median Income Welfare Eligibility Calculator Styles
 * 중위소득 기준 복지혜택 판정 계산기
 *
 * @package Zipper
 */

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

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

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

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

.mwc-section,
.mwc-result-summary,
.mwc-core-section,
.mwc-reference-section,
.mwc-table-section,
.mwc-tips-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;
}

.mwc-section:hover,
.mwc-result-summary:hover,
.mwc-core-section:hover,
.mwc-reference-section:hover,
.mwc-table-section:hover,
.mwc-tips-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

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

.mwc-section-title i,
.mwc-block-title i {
    color: #d4af37;
    font-size: 15px;
}

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

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

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

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

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

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

.mwc-amount-wrap {
    position: relative;
}

.mwc-amount-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 36px 10px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mwc-amount-input:hover {
    border-color: #d4c67a;
}

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

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

.mwc-amount-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9e9a96;
    font-size: 12px;
    pointer-events: none;
}

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

.mwc-hint {
    margin-top: 4px;
    font-size: 11px;
    color: #9e9a96;
    line-height: 1.45;
}

.mwc-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mwc-preview-item {
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    padding: 8px 10px;
}

.mwc-preview-label {
    display: block;
    font-size: 11px;
    color: #8c8578;
    margin-bottom: 2px;
}

.mwc-preview-value {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #2d2a26;
}

.mwc-checklist {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mwc-checklist li {
    color: #5f5a56;
    font-size: 12px;
    line-height: 1.5;
}

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

.mwc-calculate-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #d4af37 0%, #c49a1f 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.mwc-reset-btn {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    background: #f5f3f0;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.mwc-reset-btn:hover {
    border-color: #d4c67a;
    background: #fff;
}

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

.mwc-waiting i {
    font-size: 32px;
    color: #d4af37;
    opacity: 0.4;
    display: block;
    margin-bottom: 4px;
}

.mwc-waiting p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

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

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

.mwc-summary-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 12px;
}

.mwc-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mwc-summary-item {
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.mwc-summary-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #8c8578;
    margin-bottom: 6px;
}

.mwc-summary-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #2d2a26;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.mwc-summary-item:nth-child(3),
.mwc-summary-item:nth-child(4) {
    border-color: #e8d9ab;
    background: #fffdf5;
}

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

.mwc-summary-item:nth-child(4) .mwc-summary-value {
    font-size: 16px;
}

.mwc-core-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mwc-core-card {
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    background: #fff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(45, 42, 38, 0.05);
}

.mwc-core-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
}

.mwc-core-header i {
    color: #d4af37;
}

.mwc-core-status {
    display: inline-flex;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.mwc-core-status.pass {
    color: #1d7a3f;
    background: #e8f7ef;
}

.mwc-core-status.fail {
    color: #a53d3d;
    background: #fbeaea;
}

.mwc-core-threshold,
.mwc-core-gap {
    font-size: 13px;
    color: #5f5a56;
    line-height: 1.5;
}

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

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

.mwc-table th,
.mwc-table td {
    border-bottom: 1px solid #efece6;
    padding: 9px 8px;
    text-align: left;
    font-size: 12px;
}

.mwc-table th {
    background: #faf9f7;
    color: #6f685d;
    font-weight: 700;
    white-space: nowrap;
}

.mwc-table td {
    color: #4b463f;
    vertical-align: middle;
}

.mwc-table tr.mwc-selected-row td {
    background: #fffdf6;
}

.mwc-pass-text {
    color: #1d7a3f;
    font-weight: 700;
    font-size: 13px;
}

.mwc-fail-text {
    color: #a53d3d;
    font-weight: 700;
    font-size: 13px;
}

.mwc-table-note {
    margin: 8px 0 0;
    font-size: 11px;
    color: #9e9a96;
    line-height: 1.5;
}

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

.mwc-tips-list li {
    color: #5f5a56;
    font-size: 12px;
    line-height: 1.55;
}

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

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

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

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

    .mwc-amount-input,
    .mwc-select {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 640px) {
    .mwc-core-grid,
    .mwc-summary-grid,
    .mwc-preview-grid {
        grid-template-columns: 1fr;
    }

    .mwc-btn-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
}

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

    .mwc-section,
    .mwc-result-summary,
    .mwc-core-section,
    .mwc-reference-section,
    .mwc-table-section,
    .mwc-tips-section {
        padding: 14px;
    }

    .mwc-table th,
    .mwc-table td {
        font-size: 11px;
        padding: 8px 6px;
    }

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

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

@media (prefers-reduced-motion: reduce) {
    .mwc-section,
    .mwc-result-summary,
    .mwc-core-section,
    .mwc-reference-section,
    .mwc-table-section,
    .mwc-tips-section,
    .mwc-amount-input,
    .mwc-select,
    .mwc-calculate-btn,
    .mwc-reset-btn {
        transition: none !important;
    }

    .mwc-calculate-btn:hover {
        transform: none !important;
    }
}
