/**
 * Delayed Interest Calculator Styles
 * Prefix: lic-
 *
 * @package Zipper
 */

/* ===== Main Layout (self-grid, Rule 38/51) ===== */
.lic-main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
}

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

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

/* ===== Section Card (Rule 49) ===== */
.lic-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;
}

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

/* ===== Tabs (3 tabs = flex, Rule 25) ===== */
.lic-tab-section {
    padding: 14px;
}

.lic-tabs {
    display: flex;
    gap: 4px;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 3px;
}

.lic-tab {
    flex: 1;
    padding: 8px 4px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #8a8580;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.lic-tab:hover {
    color: #5f5a56;
    background: rgba(255, 255, 255, 0.5);
}

.lic-tab.active {
    color: #fff;
    background: #d4af37;
    box-shadow: 0 2px 4px rgba(212, 175, 55, 0.3);
}

/* ===== Tab Content (Rule 44: inner spacing) ===== */
.lic-tab-content {
    display: none;
    flex-direction: column;
    gap: 14px;
}

.lic-tab-content.active {
    display: flex;
}

/* ===== Law Guide Card ===== */
.lic-law-guide {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
    border-radius: 10px;
    padding: 14px;
    font-size: 13px;
    color: #6b6560;
    line-height: 1.6;
}

.lic-law-guide i {
    color: #d4af37;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

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

.lic-form-group:last-child {
    margin-bottom: 0;
}

.lic-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3d3a37;
    margin-bottom: 6px;
}

.lic-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Amount Input (Rule 20/24/49) ===== */
.lic-amount-input {
    flex: 1;
    padding: 10px 12px;
    text-align: right;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    font-size: 15px;
    font-weight: 500;
    color: #2d2a26;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    max-width: 100%;
    box-sizing: border-box;
}

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

.lic-amount-input::placeholder {
    color: #c4c0bc;
}

.lic-input-suffix {
    font-size: 14px;
    font-weight: 500;
    color: #8a8580;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== Korean Amount (Rule 49: gold) ===== */
.lic-korean-amount {
    font-size: 11px;
    color: #d4af37;
    min-height: 16px;
    margin-top: 4px;
    text-align: right;
}

/* ===== Date Input (Rule 24) ===== */
.lic-date-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    font-size: 14px;
    color: #2d2a26;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    max-width: 100%;
    box-sizing: border-box;
}

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

/* ===== Rate Input ===== */
.lic-rate-input {
    width: 80px;
    padding: 10px 12px;
    text-align: right;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    font-size: 15px;
    font-weight: 500;
    color: #2d2a26;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    max-width: 100%;
    box-sizing: border-box;
}

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

.lic-input-hint {
    font-size: 11px;
    color: #a09a94;
    margin-top: 4px;
}

/* ===== Checkbox & Radio (Rule 32: no width:100%) ===== */
.lic-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5f5a56;
    cursor: pointer;
}

.lic-checkbox-label input[type="checkbox"] {
    accent-color: #d4af37;
}

.lic-rate-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lic-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5f5a56;
    cursor: pointer;
}

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

/* ===== Buttons (Rule 49: gold gradient) ===== */
.lic-btn-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

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

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

/* Rule 49: reset btn 13px/500 */
.lic-reset-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: #f5f3f0;
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* ===== Waiting (Rule 49/52) ===== */
.lic-waiting {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    text-align: center;
}

.lic-waiting i {
    font-size: 40px;
    color: #d4af37;
    opacity: 0.4;
    margin-bottom: 16px;
}

.lic-waiting-text {
    font-size: 14px;
    color: #a09a94;
    line-height: 1.6;
    margin: 0;
}

/* ===== Result Summary (Rule 49: gold gradient border) ===== */
.lic-result-summary {
    background: linear-gradient(135deg, #fdfbf5, #faf6ec);
    border: 2px solid #d4af37;
}

.lic-result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8dfc0;
}

.lic-result-header i {
    color: #d4af37;
    font-size: 18px;
}

.lic-result-header span {
    font-size: 15px;
    font-weight: 600;
    color: #3d3a37;
}

.lic-result-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lic-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lic-result-label {
    font-size: 13px;
    color: #6b6560;
}

.lic-result-value {
    font-size: 14px;
    font-weight: 600;
    color: #3d3a37;
}

.lic-result-highlight {
    color: #d4af37;
    font-size: 16px;
}

.lic-result-divider {
    height: 1px;
    background: #e8dfc0;
    margin: 4px 0;
}

.lic-result-total-row {
    padding-top: 4px;
}

.lic-result-total {
    font-size: 20px;
    font-weight: 700;
    color: #d4af37;
}

/* ===== Calculation Detail ===== */
.lic-detail-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e4dc;
}

.lic-detail-header i {
    color: #d4af37;
    font-size: 16px;
}

.lic-detail-header span {
    font-size: 14px;
    font-weight: 600;
    color: #3d3a37;
}

.lic-detail-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* JS-generated calculation step classes (Rule 40) */
.lic-calc-step {
    background: #faf9f7;
    border-radius: 8px;
    padding: 12px;
}

.lic-calc-step-title {
    font-size: 12px;
    font-weight: 600;
    color: #8a8580;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.lic-calc-formula {
    font-size: 13px;
    color: #5f5a56;
    line-height: 1.6;
    font-family: 'Courier New', monospace;
}

.lic-calc-result {
    font-size: 15px;
    font-weight: 600;
    color: #d4af37;
    margin-top: 6px;
}

.lic-calc-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(135deg, #fdfbf5, #faf6ec);
    border: 1px solid #e8dfc0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #3d3a37;
}

.lic-calc-subtotal span:last-child {
    color: #d4af37;
}

/* ===== Disclaimer (Rule 49) ===== */
.lic-disclaimer {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12px;
    color: #a09a94;
    line-height: 1.5;
    padding: 14px;
}

.lic-disclaimer i {
    color: #c9a030;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

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

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

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

    /* Rule 24: inputs max-width, Rule 32: radio/checkbox excluded */
    .lic-amount-input,
    .lic-date-input,
    .lic-rate-input,
    select {
        max-width: 100%;
        box-sizing: border-box;
    }
}

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

    .lic-tab {
        font-size: 12px;
        padding: 7px 3px;
    }

    .lic-result-total {
        font-size: 18px;
    }

    .lic-waiting {
        padding: 36px 16px;
    }

    .lic-waiting i {
        font-size: 32px;
    }
}
