/**
 * 상속포기·한정승인 비용 계산기
 * @package Zipper
 */

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

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

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

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

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

.irlac-tab-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #f5f3ef;
    border-radius: 10px;
    padding: 6px;
}

.irlac-tab {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6a645c;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    padding: 10px 8px;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.irlac-tab:hover {
    color: #4f4637;
}

.irlac-tab.is-active {
    background: #fff;
    color: #2d2a26;
    box-shadow: 0 2px 6px rgba(45, 42, 38, 0.12);
}

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

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

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

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

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

.irlac-input-panel {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

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

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

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

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

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

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

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

.irlac-amount-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    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;
}

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

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

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

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

.irlac-amount-input {
    min-width: 0;
}

.irlac-unit {
    min-width: 62px;
    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: #6a645c;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.irlac-amount-row-readonly .irlac-input {
    cursor: default;
}

.irlac-korean-amount,
.irlac-hint {
    margin: 6px 0 0;
    color: #7a746b;
    font-size: 12px;
    line-height: 1.5;
}

.irlac-korean-amount {
    color: #5e584f;
    font-weight: 600;
}

.irlac-reference-section {
    background: linear-gradient(180deg, #fffdf9 0%, #faf7f1 100%);
}

.irlac-reference-list {
    margin: 0;
    padding-left: 18px;
    color: #5f5a56;
    font-size: 13px;
    line-height: 1.6;
}

.irlac-reference-list li + li {
    margin-top: 6px;
}

.irlac-btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.irlac-btn {
    border: 0;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

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

.irlac-btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #c79b28 100%);
    color: #fffdf8;
    box-shadow: 0 8px 18px rgba(199, 155, 40, 0.18);
}

.irlac-btn-ghost {
    background: #f5f3ef;
    color: #4f4637;
}

.irlac-waiting {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #6a645c;
}

.irlac-waiting i {
    color: #d4af37;
    font-size: 18px;
    line-height: 1;
    margin-top: 2px;
}

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

.irlac-summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f7edd0;
    color: #8a6820;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

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

.irlac-main-value {
    margin: 0;
    color: #2d2a26;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
}

.irlac-summary-note,
.irlac-block-sub {
    margin: 8px 0 0;
    color: #6c665e;
    font-size: 13px;
    line-height: 1.6;
}

.irlac-summary-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.irlac-summary-item {
    border: 1px solid #eee7da;
    border-radius: 12px;
    background: linear-gradient(180deg, #fffdfa 0%, #faf7f1 100%);
    padding: 14px 14px 13px;
    min-width: 0;
}

.irlac-summary-item.is-kpi {
    border-color: #e6d7a8;
    background: linear-gradient(180deg, #fff8e5 0%, #f9f1d5 100%);
}

.irlac-summary-label {
    display: block;
    color: #766e63;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.irlac-summary-value {
    display: block;
    margin-top: 6px;
    color: #2d2a26;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.25;
    word-break: keep-all;
}

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

.irlac-chart-wrap {
    position: relative;
    min-height: 280px;
    margin-top: 14px;
}

.irlac-chart-wrap canvas {
    width: 100% !important;
    height: 280px !important;
}

.irlac-chart-fallback {
    margin-top: 12px;
    color: #8a6441;
    font-size: 12px;
    line-height: 1.5;
}

.irlac-fallback-table-wrap {
    margin-top: 12px;
}

.irlac-fallback-table,
.irlac-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #3f3a35;
}

.irlac-fallback-table th,
.irlac-fallback-table td,
.irlac-table th,
.irlac-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #eee7dc;
    text-align: left;
    vertical-align: top;
}

.irlac-fallback-table thead th,
.irlac-table thead th {
    background: #faf7f2;
    color: #5f584e;
    font-size: 12px;
    font-weight: 700;
}

.irlac-empty-row td {
    color: #7b756b;
    text-align: center;
}

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

.irlac-meta-table th:first-child,
.irlac-meta-table td:first-child {
    width: 180px;
}

.irlac-notice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.irlac-notice-item {
    border: 1px solid #eee7da;
    border-radius: 10px;
    background: #fcfbf8;
    padding: 12px;
}

.irlac-notice-label {
    display: block;
    color: #7b746b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.irlac-notice-value {
    display: block;
    margin-top: 6px;
    color: #2d2a26;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.irlac-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid #f0e4ca;
    border-radius: 12px;
    background: #fffaf0;
    color: #6d624f;
    font-size: 13px;
    line-height: 1.6;
}

.irlac-disclaimer i {
    color: #d4af37;
    line-height: 1;
    margin-top: 2px;
}

.tool-description .irlac-date-notice {
    margin-bottom: 18px;
    color: #6b655c;
    font-size: 13px;
    line-height: 1.6;
}

.tool-description ul {
    padding-left: 20px;
}

.tool-description li + li {
    margin-top: 6px;
}

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

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

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

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

    .irlac-input-row,
    .irlac-summary-grid,
    .irlac-notice-grid,
    .irlac-btn-group {
        grid-template-columns: 1fr;
    }

    .irlac-summary-title {
        font-size: 20px;
    }

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

    .irlac-chart-wrap,
    .irlac-chart-wrap canvas {
        height: 240px !important;
        min-height: 240px;
    }
}

@media (max-width: 480px) {
    .irlac-section,
    .irlac-result-summary,
    .irlac-chart-section,
    .irlac-table-section {
        padding: 14px;
        border-radius: 10px;
    }

    .irlac-tab {
        font-size: 12px;
        padding: 10px 6px;
    }

    .irlac-input,
    .irlac-btn,
    .irlac-summary-value,
    .irlac-notice-value {
        font-size: 13px;
    }

    .irlac-main-value {
        font-size: 26px;
    }

    .irlac-unit {
        min-width: 56px;
        padding: 0 8px;
    }

    .irlac-chart-wrap,
    .irlac-chart-wrap canvas {
        height: 220px !important;
        min-height: 220px;
    }
}
