/* ===== 손해배상금 계산기 (Damages Calculator) ===== */

/* === Layout === */
.dc-main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
}

.dc-input-col {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dc-result-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* === Sections === */
.dc-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    transition: box-shadow 0.2s ease;
}

.dc-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

.dc-section + .dc-section {
    margin-top: 14px;
}

.dc-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dc-section-title i {
    font-size: 16px;
    color: #d4af37;
}

/* === Input Groups === */
.dc-input-group {
    margin-bottom: 12px;
}

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

.dc-input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 6px;
}

.dc-input-field {
    width: 100%;
    padding: 10px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    color: #2d2a26;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

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

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

/* === Amount Input === */
.dc-amount-input {
    position: relative;
}

.dc-amount-field {
    width: 100%;
    padding: 10px 12px;
    padding-right: 40px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    color: #2d2a26;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    text-align: right;
}

.dc-amount-field:hover {
    border-color: #d4c67a;
}

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

.dc-amount-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7a756d;
    font-size: 13px;
    pointer-events: none;
}

.dc-amount-display {
    font-size: 12px;
    color: #d4af37;
    margin-top: 4px;
    min-height: 16px;
}

/* === Radio Buttons === */
.dc-radio-group {
    display: flex;
    gap: 8px;
}

.dc-radio-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    color: #5f5a56;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dc-radio-label:hover {
    border-color: #d4c67a;
}

.dc-radio-label input[type="radio"] {
    display: none;
}

.dc-radio-label.active {
    background: rgba(212, 175, 55, 0.06);
    border-color: #d4af37;
    color: #2d2a26;
    font-weight: 600;
}

/* === Range Slider === */
.dc-range-group {
    margin-bottom: 14px;
}

.dc-range-group:last-child {
    margin-bottom: 0;
}

.dc-range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dc-range-label {
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
}

.dc-range-value {
    font-size: 14px;
    font-weight: 700;
    color: #d4af37;
    min-width: 48px;
    text-align: right;
}

.dc-range-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e8e4dc;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.dc-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #d4af37;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.3);
}

.dc-range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #d4af37;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.3);
}

/* === Buttons === */
.dc-btn-group {
    display: flex;
    gap: 8px;
}

.dc-btn-calculate {
    flex: 1;
    padding: 12px 16px;
    background: linear-gradient(135deg, #d4af37, #c9a030);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

.dc-btn-calculate:hover {
    background: linear-gradient(135deg, #c9a030, #b8922a);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
    transform: translateY(-1px);
}

.dc-btn-calculate:active {
    transform: translateY(0);
}

.dc-btn-reset {
    padding: 12px 16px;
    background: #f5f3f0;
    color: #5f5a56;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dc-btn-reset:hover {
    background: #eae7e3;
}

/* === Waiting Area === */
.dc-waiting {
    text-align: center;
    padding: 40px 20px;
    color: #9e9a96;
}

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

.dc-waiting p {
    font-size: 13px;
    margin: 0;
}

/* === Result Summary === */
.dc-result-summary {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.12);
}

.dc-summary-title {
    font-size: 12px;
    color: #7a756d;
    margin-bottom: 8px;
}

.dc-summary-main {
    font-size: 36px;
    font-weight: 700;
    color: #d4af37;
    line-height: 1.2;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.dc-summary-main .dc-summary-unit {
    font-size: 18px;
    font-weight: 600;
}

.dc-summary-label {
    font-size: 13px;
    color: #5f5a56;
    margin-bottom: 16px;
    min-height: 20px;
}

.dc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid #e8e4dc;
    font-size: 13px;
}

.dc-summary-row-label {
    color: #7a756d;
}

.dc-summary-row-value {
    font-weight: 600;
    color: #2d2a26;
}

/* === Detail Cards === */
.dc-detail-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.dc-detail-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
}

.dc-detail-card:hover {
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.12);
}

.dc-detail-label {
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dc-detail-label i {
    color: #d4af37;
}

.dc-detail-value {
    font-size: 24px;
    font-weight: 700;
    color: #2d2a26;
}

.dc-detail-value .dc-detail-unit {
    font-size: 14px;
    font-weight: 500;
    color: #7a756d;
}

/* === Chart Section === */
.dc-chart-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.dc-chart-title {
    font-size: 15px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dc-chart-title i {
    color: #d4af37;
}

.dc-chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dc-chart-box {
    text-align: center;
}

.dc-chart-box-title {
    font-size: 13px;
    color: #5f5a56;
    margin-bottom: 8px;
}

.dc-chart-canvas-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}

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

.dc-bar-canvas-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
}

.dc-bar-canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

/* === Calculation Detail Table === */
.dc-calc-detail {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.dc-calc-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.dc-calc-title {
    font-size: 15px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dc-calc-title i {
    color: #d4af37;
}

.dc-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #217346;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.dc-btn-download:hover {
    background: #1a5c38;
}

.dc-calc-table {
    width: 100%;
    border-collapse: collapse;
}

.dc-calc-table th,
.dc-calc-table td {
    padding: 10px 12px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid #e8e4dc;
}

.dc-calc-table th {
    color: #7a756d;
    font-weight: 600;
    background: #faf9f7;
}

.dc-calc-table td {
    color: #2d2a26;
}

.dc-calc-table tr:last-child td {
    border-bottom: none;
}

.dc-calc-table .dc-calc-total td {
    font-weight: 700;
    color: #d4af37;
    font-size: 14px;
    background: rgba(212, 175, 55, 0.05);
}

/* === Disclaimer === */
.dc-disclaimer {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
}

.dc-disclaimer-title {
    font-size: 13px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dc-disclaimer-text {
    font-size: 12px;
    color: #9e9a96;
    line-height: 1.6;
    margin: 0;
    padding-left: 18px;
}

.dc-disclaimer-text li {
    margin-bottom: 4px;
}

/* === Hidden Utility === */
.dc-hidden {
    display: none !important;
}

/* === Responsive === */
@media (max-width: 900px) {
    .dc-main-layout {
        grid-template-columns: 1fr;
    }
    .dc-input-col {
        position: static;
    }
}

@media (max-width: 768px) {
    .dc-detail-cards {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .dc-chart-grid {
        grid-template-columns: 1fr;
    }
    .dc-summary-main {
        font-size: 28px;
    }
    .dc-detail-card {
        padding: 14px 10px;
    }
    .dc-detail-value {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .dc-section {
        padding: 16px;
    }
    .dc-result-summary {
        padding: 20px;
    }
    .dc-detail-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .dc-detail-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        padding: 14px;
    }
    .dc-detail-label {
        justify-content: flex-start;
        margin-bottom: 0;
    }
    .dc-detail-value {
        font-size: 22px;
    }
    .dc-summary-main {
        font-size: 24px;
    }
    .dc-radio-label {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
    .dc-section,
    .dc-input-field,
    .dc-amount-field,
    .dc-btn-calculate,
    .dc-btn-reset,
    .dc-radio-label,
    .dc-detail-card {
        transition: none;
    }
    .dc-btn-calculate:hover,
    .dc-detail-card:hover {
        transform: none;
    }
}

/* Excel button guard */
.tool-btn-excel {
  background: #59ab79;
  border-color: #59ab79;
}

.tool-btn-excel:hover,
.tool-btn-excel:focus-visible {
  background: #4f9f70;
  border-color: #4f9f70;
}

