/**
 * 유류분 반환청구액 계산기
 * @package Zipper
 */

.yrc-main-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

.yrc-input::placeholder {
    color: #b7b1a8;
}

.yrc-input[type="number"] {
    -moz-appearance: textfield;
}

.yrc-input[type="number"]::-webkit-outer-spin-button,
.yrc-input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
}

.yrc-chip-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

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

.yrc-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 8px;
    border: 1px solid #e4ddd0;
    border-radius: 10px;
    background: #faf9f7;
    color: #6f675d;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.yrc-chip input[type="radio"] {
    display: none;
}

.yrc-chip:hover {
    border-color: #d4c67a;
    color: #4f4637;
}

.yrc-chip.is-active {
    background: rgba(212, 175, 55, 0.08);
    border-color: #d4af37;
    color: #2d2a26;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.16);
}

.yrc-amount-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    width: 100%;
    max-width: 100%;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    background: #fbfaf8;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.yrc-amount-row:hover {
    border-color: #d4c67a;
}

.yrc-amount-row:focus-within {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: #fff;
}

.yrc-amount-row .yrc-input {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: right;
    font-weight: 600;
}

.yrc-amount-row .yrc-input:hover,
.yrc-amount-row .yrc-input:focus {
    border: 0;
    box-shadow: none;
    background: transparent;
}

.yrc-unit {
    min-width: 58px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #e4ddd0;
    background: linear-gradient(180deg, #fcfbf8 0%, #f3efe8 100%);
    color: #7b7467;
    font-size: 12px;
    user-select: none;
    box-sizing: border-box;
}

.yrc-korean-amount {
    margin: 6px 0 0;
    color: #8b836f;
    font-size: 11px;
    line-height: 1.4;
}

.yrc-hint {
    margin: 6px 0 0;
    color: #8f887d;
    font-size: 11px;
    line-height: 1.5;
}

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

.yrc-btn {
    flex: 1;
    min-height: 46px;
    border-radius: 10px;
    border: 1px solid #e8e4dc;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.yrc-btn:hover {
    transform: translateY(-1px);
}

.yrc-btn-primary {
    background: #faf7f2;
    color: #2d2a26;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.12);
}

.yrc-btn-primary:hover {
    background: #f7f0e1;
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.18);
}

.yrc-btn-secondary {
    background: #fff;
    color: #5f5a56;
}

.yrc-btn-secondary:hover {
    border-color: #cfc7b9;
    background: #faf9f7;
}

.yrc-status-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #fffdf8 0%, #faf7ef 100%);
}

.yrc-status-badge,
.yrc-summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    color: #8a6500;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.yrc-status-text,
.yrc-summary-note,
.yrc-main-korean {
    margin: 0;
    color: #655f58;
    font-size: 13px;
    line-height: 1.6;
}

.yrc-result-summary {
    display: grid;
    gap: 12px;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border-color: #eadfb8;
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.14);
}

.yrc-summary-title {
    margin: 0;
    color: #2d2a26;
    font-size: 22px;
    line-height: 1.3;
}

.yrc-main-amount {
    color: #2d2a26;
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.yrc-main-korean {
    color: #8a6500;
    font-size: 12px;
    font-weight: 700;
}

.yrc-main-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.yrc-main-kpi,
.yrc-metric-card {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #ece4cf;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
    box-sizing: border-box;
}

.yrc-main-kpi-label,
.yrc-metric-label {
    color: #776f65;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.yrc-main-kpi-value,
.yrc-metric-value {
    min-width: 0;
    color: #2d2a26;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    word-break: break-word;
}

.yrc-support-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.yrc-metric-sub {
    margin: 0;
    color: #827a71;
    font-size: 11px;
    line-height: 1.45;
}

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

.yrc-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.yrc-table th,
.yrc-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #eee7da;
    text-align: left;
    vertical-align: top;
    font-size: 12px;
    line-height: 1.55;
    color: #3f3a35;
}

.yrc-table th {
    color: #6a645d;
    font-size: 11px;
    font-weight: 800;
    background: #faf8f3;
    white-space: nowrap;
}

.yrc-table td:last-child,
.yrc-table th:last-child {
    text-align: right;
    white-space: nowrap;
}

.yrc-empty-row td {
    text-align: center !important;
    color: #9b958d;
}

.yrc-disclaimer {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid #eadfc7;
    border-radius: 12px;
    background: #fffaf3;
    color: #6c6358;
    font-size: 12px;
    line-height: 1.65;
}

.yrc-disclaimer i {
    color: #d4af37;
    font-size: 15px;
    margin-top: 2px;
}

.yrc-law-notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #eadfc7;
    background: #fff9f1;
    color: #6d6458;
    font-size: 13px;
    line-height: 1.65;
}

@media (max-width: 1100px) {
    .yrc-support-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

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

    .yrc-main-kpi-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .yrc-section,
    .yrc-status-card,
    .yrc-result-summary,
    .yrc-table-section {
        padding: 16px;
    }

    .yrc-input-row,
    .yrc-support-grid,
    .yrc-chip-group {
        grid-template-columns: 1fr;
    }

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

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

    .yrc-table {
        min-width: 560px;
    }
}

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

    .yrc-chip-group-2 {
        grid-template-columns: 1fr;
    }

    .yrc-main-amount {
        font-size: 30px;
    }

    .yrc-table {
        min-width: 520px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yrc-section,
    .yrc-status-card,
    .yrc-result-summary,
    .yrc-table-section,
    .yrc-input,
    .yrc-chip,
    .yrc-btn,
    .yrc-amount-row {
        transition: none !important;
    }

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