/**
 * Customs Duty Calculator Styles
 * Overseas direct purchase customs duty calculator
 *
 * @package Zipper
 */

/* ===== 2-Column Layout (Desktop) ===== */
.cdc-main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
}

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

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

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

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

.cdc-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cdc-section-title i {
    color: #d4af37;
    font-size: 15px;
}

/* ===== Tabs ===== */
.cdc-tabs {
    display: flex;
    gap: 4px;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 3px;
}

.cdc-tab {
    flex: 1;
    padding: 8px 6px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9e9a96;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.cdc-tab:hover {
    color: #5f5a56;
}

.cdc-tab.active {
    background: #fff;
    color: #d4af37;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.15);
}

.cdc-tab i {
    font-size: 13px;
}

.cdc-tab-content {
    display: none;
}

.cdc-tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ===== Input Group ===== */
.cdc-input-group {
    margin-bottom: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

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

.cdc-input-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #5f5a56;
    margin-bottom: 6px;
}

.cdc-input-label .cdc-label-hint {
    font-weight: 400;
    color: #9e9a96;
    margin-left: 4px;
}

.cdc-amount-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 600;
    text-align: right;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

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

.cdc-amount-input::placeholder {
    font-weight: 400;
    color: #c4c0bc;
}

.cdc-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    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: 32px;
}

.cdc-select:hover {
    border-color: #d4c67a;
}

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

.cdc-korean-amount {
    font-size: 11px;
    color: #d4af37;
    margin-top: 4px;
    text-align: right;
    min-height: 16px;
}

.cdc-hint {
    font-size: 11px;
    color: #9e9a96;
    margin-top: 4px;
}

/* ===== Category Info ===== */
.cdc-category-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.cdc-clearance-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.cdc-badge-list {
    background: #e8f5e9;
    color: #2e7d32;
}

.cdc-badge-general {
    background: #fff3e0;
    color: #e65100;
}

.cdc-duty-rate-display {
    font-size: 12px;
    font-weight: 600;
    color: #d4af37;
}

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

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

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

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

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

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

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

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

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

.cdc-summary-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 8px;
}

.cdc-summary-badge.cdc-badge-free {
    background: #e8f5e9;
    color: #2e7d32;
}

.cdc-summary-badge.cdc-badge-taxed {
    background: #fff3e0;
    color: #e65100;
}

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

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

.cdc-summary-sub {
    font-size: 14px;
    color: #5f5a56;
    margin-bottom: 12px;
}

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

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

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

/* ===== Tax Flow Steps ===== */
.cdc-flow-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cdc-flow-title i {
    color: #d4af37;
}

.cdc-flow-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cdc-flow-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.cdc-flow-step:nth-child(odd) {
    background: #faf9f7;
}

.cdc-flow-step-label {
    color: #5f5a56;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cdc-flow-step-label .cdc-flow-op {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.cdc-flow-op-plus {
    background: #f0fff0;
    color: #27ae60;
}

.cdc-flow-op-equals {
    background: #f0f7ff;
    color: #3498db;
}

.cdc-flow-op-multiply {
    background: #fdf5e6;
    color: #d4af37;
}

.cdc-flow-step-value {
    font-weight: 600;
    color: #2d2a26;
    text-align: right;
}

.cdc-flow-step.cdc-flow-highlight {
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
}

.cdc-flow-step.cdc-flow-highlight .cdc-flow-step-value {
    color: #d4af37;
    font-size: 15px;
}

/* ===== Cost Card ===== */
.cdc-cost-card {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.12);
}

.cdc-cost-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cdc-cost-title i {
    color: #d4af37;
}

.cdc-cost-main {
    font-size: 28px;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 12px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

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

.cdc-cost-row-label {
    color: #7a756d;
}

.cdc-cost-row-value {
    font-weight: 600;
    color: #2d2a26;
}

/* ===== Tips ===== */
.cdc-tips-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cdc-tips-title i {
    color: #d4af37;
}

.cdc-tips-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cdc-tip-card {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    background: #faf9f7;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #5f5a56;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cdc-tip-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.08);
}

.cdc-tip-icon {
    font-size: 16px;
    color: #d4af37;
    flex-shrink: 0;
    margin-top: 1px;
}

.cdc-tip-text strong {
    color: #2d2a26;
}

/* ===== Disclaimer ===== */
.cdc-disclaimer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    font-size: 11px;
    color: #9e9a96;
    line-height: 1.5;
}

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

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

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .cdc-section,
    .cdc-amount-input,
    .cdc-select,
    .cdc-calculate-btn,
    .cdc-tip-card {
        transition: none !important;
    }
    .cdc-section:hover,
    .cdc-tip-card:hover,
    .cdc-calculate-btn:hover {
        transform: none !important;
    }
}

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

    .cdc-input-col {
        position: static;
        width: 100%;
    }

    .cdc-result-col {
        width: 100%;
    }

    .cdc-input-group input:not([type="radio"]):not([type="checkbox"]),
    .cdc-input-group select {
        width: 100% !important;
        max-width: 100% !important;
    }

    .cdc-summary-main {
        font-size: 26px;
    }

    .cdc-cost-main {
        font-size: 24px;
    }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 480px) {
    .cdc-section {
        padding: 12px;
    }

    .cdc-result-summary {
        padding: 16px;
    }

    .cdc-cost-card {
        padding: 16px;
    }

    .cdc-summary-main {
        font-size: 22px;
    }

    .cdc-cost-main {
        font-size: 20px;
    }

    .cdc-tab {
        font-size: 12px;
        padding: 7px 4px;
    }

    .cdc-category-info {
        flex-wrap: wrap;
    }
}
