/* Additional Tax Calculator (가산세 계산기) */
/* Prefix: atc- */

/* ===== Main Layout ===== */
.atc-main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    margin-top: 10px;
}

.atc-input-col {
    position: sticky;
    top: 20px;
    align-self: start;
}

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

/* ===== Section ===== */
.atc-section {
    background: #ffffff;
    border: 1px solid #e8e0d0;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.06);
}

.atc-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #5a4a3b;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* ===== Tab Buttons ===== */
.atc-tab-buttons {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    background: #f8f5f0;
    border-radius: 8px;
    padding: 4px;
}

.atc-tab-btn {
    flex: 1;
    padding: 8px 4px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #8a7a6a;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.atc-tab-btn:hover {
    color: #5a4a3b;
    background: rgba(212, 175, 55, 0.08);
}

.atc-tab-btn.active {
    background: #ffffff;
    color: #d4af37;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ===== Tab Content ===== */
.atc-tab-content {
    display: none;
}

.atc-tab-content.active {
    display: block;
}

/* ===== Form Elements ===== */
.atc-form-group {
    margin-bottom: 14px;
}

.atc-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #5a4a3b;
    margin-bottom: 6px;
}

.atc-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0d6c8;
    border-radius: 8px;
    font-size: 14px;
    color: #3d3428;
    background: #fffdf8;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.atc-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0d6c8;
    border-radius: 8px;
    font-size: 14px;
    color: #3d3428;
    background: #fffdf8;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    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 fill='%238a7a6a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

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

.atc-input-with-suffix {
    position: relative;
}

.atc-input-with-suffix .atc-input {
    padding-right: 36px;
}

.atc-input-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #8a7a6a;
    pointer-events: none;
}

.atc-korean-amount {
    display: block;
    font-size: 11.5px;
    color: #d4af37;
    margin-top: 4px;
    min-height: 16px;
}

/* ===== Radio Group ===== */
.atc-radio-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.atc-radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border: 1px solid #e0d6c8;
    border-radius: 8px;
    font-size: 12.5px;
    color: #5a4a3b;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fffdf8;
}

.atc-radio-label:hover {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.04);
}

.atc-radio-label.active {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.08);
    color: #b8960c;
    font-weight: 600;
}

.atc-radio-label input[type="radio"] {
    accent-color: #d4af37;
    margin: 0;
}

/* ===== Buttons ===== */
.atc-btn-group {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.atc-btn-calculate {
    flex: 1;
    padding: 11px 16px;
    background: linear-gradient(135deg, #d4af37, #c9a432);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.atc-btn-calculate:hover {
    background: linear-gradient(135deg, #c9a432, #b8960c);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.atc-btn-reset {
    padding: 11px 16px;
    background: #f8f5f0;
    color: #8a7a6a;
    border: 1px solid #e0d6c8;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.atc-btn-reset:hover {
    background: #f0ebe3;
    color: #5a4a3b;
}

/* ===== Waiting State ===== */
.atc-waiting {
    background: #ffffff;
    border: 1px solid #e8e0d0;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.06);
}

.atc-waiting-icon {
    font-size: 40px;
    color: #d4af37;
    margin-bottom: 16px;
    opacity: 0.6;
}

.atc-waiting-title {
    font-size: 16px;
    font-weight: 700;
    color: #5a4a3b;
    margin: 0 0 8px 0;
}

.atc-waiting-desc {
    font-size: 13px;
    color: #8a7a6a;
    margin: 0;
    line-height: 1.6;
}

/* ===== Result Summary ===== */
.atc-result-summary {
    background: #ffffff;
    border: 1px solid #e8e0d0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.06);
}

.atc-result-summary-title {
    font-size: 14px;
    font-weight: 700;
    color: #5a4a3b;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.atc-result-summary-title i {
    color: #d4af37;
    font-size: 16px;
}

.atc-result-amount {
    font-size: 28px;
    font-weight: 800;
    color: #d4af37;
    text-align: center;
    padding: 16px 0;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.06), rgba(212, 175, 55, 0.02));
    border-radius: 8px;
}

/* ===== Result Detail ===== */
.atc-result-detail {
    border-top: 1px solid #f0ebe3;
    padding-top: 12px;
}

.atc-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f5f0;
}

.atc-detail-row:last-child {
    border-bottom: none;
}

.atc-detail-label {
    font-size: 13px;
    color: #8a7a6a;
}

.atc-detail-value {
    font-size: 13px;
    font-weight: 600;
    color: #3d3428;
}

.atc-detail-row.atc-total {
    border-top: 2px solid #d4af37;
    border-bottom: none;
    margin-top: 4px;
    padding-top: 10px;
}

.atc-detail-row.atc-total .atc-detail-label {
    font-weight: 700;
    color: #5a4a3b;
}

.atc-detail-row.atc-total .atc-detail-value {
    font-weight: 800;
    color: #d4af37;
    font-size: 15px;
}

/* ===== Scenario Compare ===== */
.atc-scenario-compare {
    margin-top: 16px;
}

.atc-scenario-title {
    font-size: 13px;
    font-weight: 700;
    color: #5a4a3b;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.atc-scenario-title i {
    color: #d4af37;
}

.atc-scenario-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.atc-scenario-card {
    background: #f8f5f0;
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
    border: 1px solid #e8e0d0;
}

.atc-scenario-card.atc-current {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.06);
}

.atc-scenario-label {
    font-size: 11px;
    color: #8a7a6a;
    margin-bottom: 6px;
}

.atc-scenario-amount {
    font-size: 14px;
    font-weight: 700;
    color: #3d3428;
}

.atc-scenario-card.atc-current .atc-scenario-amount {
    color: #d4af37;
}

.atc-scenario-diff {
    font-size: 11px;
    color: #e74c3c;
    margin-top: 4px;
}

/* ===== Info Box ===== */
.atc-info-box {
    background: #f8f5f0;
    border: 1px solid #e8e0d0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.06);
}

.atc-info-title {
    font-size: 13px;
    font-weight: 700;
    color: #5a4a3b;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.atc-info-title i {
    color: #d4af37;
}

.atc-info-box ul {
    margin: 0;
    padding-left: 18px;
}

.atc-info-box li {
    font-size: 12px;
    color: #6b5b4b;
    line-height: 1.7;
    margin-bottom: 2px;
}

/* ===== Excel Button ===== */
.atc-excel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8f5f0;
    border: 1px solid #e0d6c8;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #5a4a3b;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.atc-excel-btn:hover {
    background: #f0ebe3;
    border-color: #d4af37;
}

.atc-excel-btn i {
    color: #217346;
}

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

/* ===== Mobile Responsive ===== */
@media (max-width: 900px) {
    .atc-main-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .atc-section {
        padding: 14px;
    }

    .atc-section input:not([type="radio"]):not([type="checkbox"]),
    .atc-section select {
        max-width: 100%;
        box-sizing: border-box;
    }

    .atc-radio-group {
        flex-direction: column;
    }

    .atc-radio-label {
        width: 100%;
        box-sizing: border-box;
    }

    .atc-result-amount {
        font-size: 22px;
    }

    .atc-scenario-cards {
        grid-template-columns: 1fr;
    }

    .atc-tab-btn {
        font-size: 11.5px;
        padding: 7px 2px;
    }

    .atc-waiting {
        padding: 32px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .atc-tab-btn,
    .atc-input,
    .atc-select,
    .atc-radio-label,
    .atc-btn-calculate,
    .atc-btn-reset,
    .atc-excel-btn {
        transition: 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;
}

