/**
 * Eviction Lawsuit Cost Calculator
 * 명도소송 비용 계산기
 *
 * @package Zipper
 */

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

.elcc-main-layout {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

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

.elcc-result-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.elcc-section,
.elcc-chart-section,
.elcc-table-section,
.elcc-result-summary {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.elcc-section-title,
.elcc-block-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #2d2a26;
}

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

.elcc-panel-note {
    margin: 0 0 14px;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid #efe4c8;
    background: linear-gradient(135deg, #fdfbf6, #fbf7ee);
    color: #6e6455;
    font-size: 12px;
    line-height: 1.55;
}

.elcc-tab-group {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: #f5f3ef;
}

.elcc-tab {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 11px 8px;
    background: transparent;
    color: #8b8477;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.elcc-tab:hover {
    color: #5d564c;
}

.elcc-tab.is-active {
    background: #fff;
    color: #c79f2f;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.18);
}

.elcc-tab-content {
    display: block;
}

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

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

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

.elcc-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #5c564d;
}

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

.elcc-input:hover {
    border-color: #d8c57e;
}

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

.elcc-input::placeholder {
    color: #c4c0bc;
}

select.elcc-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%235f5a56' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

.elcc-amount-row {
    position: relative;
}

.elcc-amount-row .elcc-input {
    padding-right: 46px;
    text-align: right;
    font-weight: 600;
}

.elcc-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9d968b;
    font-size: 12px;
    pointer-events: none;
}

.elcc-korean-amount {
    margin: 4px 0 0;
    min-height: 16px;
    text-align: right;
    color: #d4af37;
    font-size: 11px;
    font-weight: 600;
}

.elcc-hint {
    margin: 4px 0 0;
    color: #948d81;
    font-size: 11px;
    line-height: 1.5;
}

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

.elcc-btn {
    border-radius: 9px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.elcc-btn-primary {
    flex: 1;
    border: none;
    background: linear-gradient(135deg, #d4af37 0%, #c59d2c 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.28);
}

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

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

.elcc-btn-ghost:hover {
    background: #ece8e1;
}

.elcc-waiting {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fdfbf5;
    color: #6d6455;
}

.elcc-waiting i {
    font-size: 18px;
    color: #d4af37;
}

.elcc-summary-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: #f7f2e3;
    color: #a17812;
    font-size: 11px;
    font-weight: 700;
}

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

.elcc-summary-note {
    margin: 0;
    color: #6f685c;
    font-size: 13px;
    line-height: 1.6;
}

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

.elcc-main-kpi {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fcfaf4, #f7f0da);
    border: 1px solid #efe2ba;
}

.elcc-main-kpi-label {
    color: #7b715e;
    font-size: 12px;
    font-weight: 600;
}

.elcc-main-kpi-value {
    color: #2d2a26;
    font-size: clamp(18px, 2.5vw, 26px);
    line-height: 1.15;
    word-break: break-word;
}

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

.elcc-summary-item {
    min-width: 0;
    padding: 12px 13px;
    border-radius: 11px;
    border: 1px solid #ece7df;
    background: #fcfbf9;
}

.elcc-summary-label {
    display: block;
    color: #8a8276;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
}

.elcc-summary-value {
    display: block;
    color: #2d2a26;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
}

.elcc-block-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.elcc-block-sub {
    margin: 8px 0 0;
    color: #726b61;
    font-size: 12px;
    line-height: 1.55;
}

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

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

.elcc-chart-fallback {
    margin: 12px 0 0;
    color: #8b7f6a;
    font-size: 12px;
}

.elcc-fallback-table-wrap,
.elcc-table-wrap {
    overflow-x: auto;
    margin-top: 12px;
}

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

.elcc-fallback-table th,
.elcc-fallback-table td,
.elcc-table th,
.elcc-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee8df;
    text-align: left;
    vertical-align: top;
    font-size: 13px;
    line-height: 1.5;
}

.elcc-fallback-table th,
.elcc-table th {
    color: #6f685c;
    font-size: 12px;
    font-weight: 700;
    background: #fbf9f5;
}

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

.elcc-empty-row td {
    text-align: center !important;
    color: #91887b;
}

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

.elcc-notice-item {
    min-width: 0;
    padding: 12px;
    border-radius: 11px;
    background: #faf8f4;
    border: 1px solid #ece5da;
}

.elcc-notice-label {
    display: block;
    color: #897f70;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
}

.elcc-notice-value {
    display: block;
    color: #2d2a26;
    font-size: 13px;
    line-height: 1.45;
    word-break: break-word;
}

.elcc-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid #efe3c1;
    background: #fdfbf5;
    color: #6e6558;
    font-size: 12px;
    line-height: 1.6;
}

.elcc-disclaimer i {
    color: #d4af37;
    margin-top: 1px;
    flex-shrink: 0;
}

.elcc-date-notice {
    margin-bottom: 16px;
}

@media (max-width: 1180px) {
    .elcc-main-layout {
        grid-template-columns: minmax(0, 1fr);
    }

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

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

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

    .elcc-input-row,
    .elcc-main-kpi-grid,
    .elcc-summary-grid,
    .elcc-notice-grid,
    .elcc-btn-group {
        grid-template-columns: minmax(0, 1fr);
        flex-direction: column;
    }

    .elcc-btn-group {
        display: flex;
    }

    .elcc-chart-wrap {
        height: 240px;
    }

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

    .elcc-main-kpi-value,
    .elcc-summary-value {
        font-size: 18px;
    }
}

.elcc-download-btn.tool-btn.tool-btn-excel,
.elcc-download-btn.tool-btn-excel,
.tool-btn-excel {
    border: 1px solid #4f9f70;
    background: linear-gradient(135deg, #59ab79 0%, #4f9f70 100%);
    color: #fff;
}

.elcc-download-btn.tool-btn.tool-btn-excel:hover,
.elcc-download-btn.tool-btn.tool-btn-excel:focus-visible,
.elcc-download-btn.tool-btn-excel:hover,
.elcc-download-btn.tool-btn-excel:focus-visible,
.tool-btn-excel:hover,
.tool-btn-excel:focus-visible {
    border-color: #4f9f70;
    background: linear-gradient(135deg, #4f9f70 0%, #458b63 100%);
    color: #fff;
}
