/**
 * 채무조정 신속·프리 워크아웃 상환부담 비교 계산기
 * @package Zipper
 */

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

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

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

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

.darc-section,
.darc-result-summary,
.darc-chart-section,
.darc-table-section {
    border: 1px solid #e8e4dc;
    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;
}

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

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

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

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

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

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

.darc-input {
    width: 100%;
    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;
}

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

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

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

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

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

.darc-amount-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    width: 100%;
    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;
}

.darc-amount-wrap:hover {
    border-color: #d4c67a;
}

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

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

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

.darc-amount-wrap-small .darc-unit {
    min-width: 48px;
}

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

.darc-range-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.darc-range-wrap input[type="range"] {
    width: 100%;
    min-width: 0;
}

.darc-range-value {
    font-size: 12px;
    color: #4d473f;
    font-weight: 700;
    min-width: 48px;
    text-align: right;
}

.darc-quick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.darc-quick-btn {
    border: 1px solid #ddd7cb;
    background: #fff;
    color: #5f5a56;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    cursor: pointer;
}

.darc-quick-btn:hover {
    border-color: #d4af37;
    color: #2d2a26;
}

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

.darc-check-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.darc-check-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #4d473f;
    font-size: 12px;
    line-height: 1.45;
}

.darc-check-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    flex: 0 0 auto;
}

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

.darc-btn {
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    display: inline-flex;
    justify-content: center;
    align-items: 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;
}

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

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

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

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

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

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

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

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

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

.darc-main-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

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

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

.darc-main-kpi-value,
.darc-summary-value {
    display: block;
    font-size: 18px;
    color: #2d2a26;
    line-height: 1.25;
    word-break: keep-all;
}

.darc-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

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

.darc-download-btn {
    white-space: nowrap;
}

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

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

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

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

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

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

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

.darc-fallback-table th:first-child,
.darc-fallback-table td:first-child,
.darc-table th:first-child,
.darc-table td:first-child,
.darc-fallback-table th:nth-child(2),
.darc-fallback-table td:nth-child(2),
.darc-table th:nth-child(2),
.darc-table td:nth-child(2) {
    text-align: left;
}

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

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

.darc-feasible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 66px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.darc-feasible.is-yes {
    background: #e7f6ec;
    color: #1f7a42;
}

.darc-feasible.is-no {
    background: #fdecea;
    color: #aa3d2e;
}

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

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

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

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

.darc-notice-item {
    border: 1px solid #eee7dc;
    border-radius: 10px;
    background: #fbfaf8;
    padding: 10px;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

    .darc-btn {
        width: 100%;
    }

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

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

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

    .darc-main-kpi-value,
    .darc-summary-value {
        font-size: 16px;
    }

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