/**
 * 카드론·현금서비스 대환 절감액 + 채무조정 가정 비교 계산기
 * @package Zipper
 */

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

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

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

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

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


.drsc-center-section {
    text-align: center;
}

.drsc-section-title,
.drsc-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;
}

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

.drsc-input-group {
    margin-bottom: 12px;
    min-width: 0;
    box-sizing: border-box;
}

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

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

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

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

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

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

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

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

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

.drsc-amount-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch !important;
    justify-content: stretch !important;
    width: 100%;
    min-width: 0;
    gap: 0 !important;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    overflow: hidden;
    background: #fbfaf8;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

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

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

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

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

.drsc-amount-row select.drsc-input {
    text-align: left;
    font-weight: 500;
}

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

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

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

.drsc-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.drsc-check-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #4d473f;
    line-height: 1.4;
}

.drsc-check-row input[type="radio"] {
    width: 15px;
    height: 15px;
    accent-color: #d4af37;
}

.drsc-assumption-box {
    margin-top: 12px;
    border: 1px dashed #e3d5bb;
    border-radius: 10px;
    background: #fffaf0;
    padding: 12px;
}

.drsc-btn-group {
    display: flex;
    gap: 8px;
    width: 100%;
}

.drsc-btn {
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    min-height: 44px;
}

.drsc-btn-primary {
    flex: 1;
    color: #fff;
    background: linear-gradient(135deg, #d4af37 0%, #c69a23 100%);
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

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

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

.drsc-btn-ghost:hover {
    border-color: #d4c67a;
    color: #2d2a26;
}

.drsc-waiting {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b645a;
    font-size: 13px;
}

.drsc-waiting i {
    color: #d4af37;
}

.drsc-summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 10px;
    background: #f8f2df;
    color: #8d6a12;
    font-size: 11px;
    font-weight: 700;
}

.drsc-summary-title {
    margin: 10px 0 6px;
    color: #2d2a26;
    font-size: 20px;
    line-height: 1.35;
}

.drsc-summary-note {
    margin: 0;
    color: #6b645a;
    font-size: 13px;
    line-height: 1.55;
}

.drsc-main-kpi-grid {
    margin-top: 14px;
}

.drsc-main-kpi,
.drsc-summary-item {
    border: 1px solid #eee6d9;
    border-radius: 10px;
    background: #fcfbf8;
    padding: 12px;
    min-width: 0;
    box-sizing: border-box;
}

.drsc-main-kpi {
    background: linear-gradient(180deg, #fffcf6 0%, #fcf7eb 100%);
    border-color: #ebdfc9;
}

.drsc-main-kpi-label,
.drsc-summary-label {
    display: block;
    margin-bottom: 6px;
    color: #7b7467;
    font-size: 12px;
    line-height: 1.4;
}

.drsc-main-kpi-value,
.drsc-summary-value {
    display: block;
    color: #2d2a26;
    line-height: 1.25;
    letter-spacing: -0.01em;
    word-break: keep-all;
}

.drsc-main-kpi-value {
    font-size: 22px;
    font-weight: 800;
}

.drsc-summary-value {
    font-size: 17px;
    font-weight: 700;
}

#drscMainNetSaving,
#drscMainMonthlySaving {
    color: #1f7f4d;
}

.drsc-summary-grid {
    margin-top: 12px;
}

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

.drsc-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    white-space: nowrap;
}

#drscDownloadBtn.tool-btn.tool-btn-excel,
.drsc-download-btn.tool-btn.tool-btn-excel {
    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);
}

#drscDownloadBtn.tool-btn.tool-btn-excel:hover,
.drsc-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);
}

.drsc-block-sub {
    margin: 0 0 10px;
    color: #6b645a;
    font-size: 12px;
    line-height: 1.5;
}

.drsc-chart-wrap {
    position: relative;
    width: 100%;
    height: 320px;
    min-width: 0;
}

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

.drsc-chart-fallback {
    margin: 8px 0 0;
    color: #8a5c00;
    font-size: 12px;
    line-height: 1.45;
}

.drsc-fallback-table-wrap,
.drsc-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.drsc-fallback-table,
.drsc-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.drsc-fallback-table th,
.drsc-fallback-table td,
.drsc-table th,
.drsc-table td {
    border-bottom: 1px solid #f0ece4;
    padding: 10px 8px;
    text-align: right;
    color: #4d473f;
    font-size: 12px;
    line-height: 1.45;
    vertical-align: middle;
    white-space: nowrap;
}

.drsc-fallback-table th:first-child,
.drsc-fallback-table td:first-child,
.drsc-table th:first-child,
.drsc-table td:first-child {
    text-align: left;
}

.drsc-fallback-table thead th,
.drsc-table thead th {
    background: #faf7f0;
    color: #665f53;
    font-weight: 700;
}

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


.drsc-detail-table th:first-child,
.drsc-detail-table td:first-child {
    width: 26%;
}

.drsc-warning-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #544f47;
    font-size: 12px;
    line-height: 1.5;
}

.drsc-warning-list li.is-warning {
    color: #8a5c00;
}

.drsc-warning-list li.is-danger {
    color: #a2362a;
}

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

.drsc-notice-item {
    border: 1px solid #eee7dc;
    border-radius: 10px;
    background: #fbfaf8;
    padding: 10px;
    min-width: 0;
}

.drsc-notice-label {
    display: block;
    margin-bottom: 4px;
    color: #7b7467;
    font-size: 11px;
}

.drsc-notice-value {
    display: block;
    color: #2d2a26;
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 1200px) {
    .drsc-main-kpi-grid,
    .drsc-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

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

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

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

    .drsc-section,
    .drsc-result-summary,
    .drsc-chart-section,
    .drsc-table-section {
        padding: 16px;
    }

    .drsc-block-head {
        flex-direction: column;
        align-items: stretch;
    }

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

    .drsc-chart-wrap {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .drsc-input-row {
        grid-template-columns: 1fr;
    }

    .drsc-main-kpi-grid,
    .drsc-summary-grid,
    .drsc-notice-grid {
        grid-template-columns: 1fr !important;
    }

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

    .drsc-btn {
        width: 100%;
    }

    .drsc-fallback-table,
    .drsc-table {
        min-width: 680px;
    }

    .drsc-chart-wrap {
        height: 250px;
    }
}

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

    .drsc-summary-title {
        font-size: 18px;
    }

    .drsc-main-kpi-value {
        font-size: 18px;
    }

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

    .drsc-input,
    .drsc-btn {
        font-size: 14px;
    }

    .drsc-unit {
        min-width: 48px;
        padding: 0 8px;
        font-size: 11px;
    }

    .drsc-fallback-table,
    .drsc-table {
        min-width: 620px;
    }

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