/**
 * Child Support Calculator Styles
 *
 * @package Zipper
 */

/* ===== 2-column layout (desktop) ===== */
.csc-main-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    align-items: start;
}

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

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

/* ===== Section card ===== */
.csc-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;
}

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

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

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

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

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

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

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

/* ===== Amount input (with comma formatting) ===== */
.csc-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;
}

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

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

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

/* ===== Korean amount display ===== */
.csc-korean-amount {
    font-size: 11px;
    color: #d4af37;
    min-height: 16px;
    margin-top: 4px;
    text-align: right;
    font-weight: 500;
}

/* ===== Select ===== */
.csc-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;
    -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='%239e9a96' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

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

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

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

.csc-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.csc-radio-label.active {
    background: linear-gradient(135deg, #fdfbf5, #faf6ec);
    border-color: #d4af37;
    color: #2d2a26;
}

.csc-radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #d4af37;
    flex-shrink: 0;
}

/* ===== Children dynamic list ===== */
.csc-children-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.csc-child-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
}

.csc-child-label {
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
    min-width: 52px;
}

.csc-child-age-select {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    background: #fff;
    color: #2d2a26;
    box-sizing: border-box;
    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='%239e9a96' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

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

.csc-child-remove-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: #c4c0bc;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.csc-child-remove-btn:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.08);
}

.csc-child-add-btn {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #d4af37;
    background: none;
    border: 1px dashed #d4c67a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.csc-child-add-btn:hover {
    background: rgba(212, 175, 55, 0.06);
    border-color: #d4af37;
}

/* ===== Number input (inline) ===== */
.csc-inline-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.csc-unit {
    font-size: 12px;
    color: #9e9a96;
    white-space: nowrap;
}

/* ===== Hint text ===== */
.csc-hint {
    font-size: 11px;
    color: #9e9a96;
    margin-top: 4px;
    line-height: 1.4;
}

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

.csc-calculate-btn {
    flex: 1;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #d4af37 0%, #c9a42e 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
    transition: all 0.2s;
}

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

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

.csc-reset-btn {
    padding: 13px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #9e9a96;
    background: #f5f3f0;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.csc-reset-btn:hover {
    background: #eae7e2;
    color: #5f5a56;
}

/* ===== Waiting section ===== */
.csc-waiting {
    text-align: center;
    padding: 48px 20px;
}

.csc-waiting i {
    font-size: 40px;
    color: #e8e4dc;
    margin-bottom: 12px;
    display: block;
}

.csc-waiting p {
    font-size: 13px;
    color: #9e9a96;
    margin: 0;
}

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

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

.csc-summary-title {
    font-size: 12px;
    font-weight: 500;
    color: #9e9a96;
    margin-bottom: 4px;
}

.csc-summary-main {
    font-size: 28px;
    font-weight: 800;
    color: #d4af37;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.csc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
}

.csc-summary-row + .csc-summary-row {
    border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.csc-summary-row-label {
    color: #5f5a56;
}

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

/* ===== Child detail cards ===== */
.csc-child-detail-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.csc-detail-title i {
    color: #d4af37;
    font-size: 15px;
}

.csc-child-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.csc-child-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0ede8;
}

.csc-child-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
}

.csc-child-card-amount {
    font-size: 15px;
    font-weight: 700;
    color: #d4af37;
}

.csc-child-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.csc-child-card-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.csc-child-card-item-label {
    font-size: 11px;
    color: #9e9a96;
}

.csc-child-card-item-value {
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
}

.csc-child-card-divider {
    height: 1px;
    background: #f0ede8;
    margin: 10px 0;
    grid-column: 1 / -1;
}

.csc-child-card-share {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #faf9f7;
    border-radius: 8px;
    font-size: 12px;
}

.csc-child-card-share-label {
    color: #5f5a56;
}

.csc-child-card-share-value {
    font-weight: 600;
    color: #2d2a26;
}

/* ===== Total projection section ===== */
.csc-projection-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

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

.csc-projection-title i {
    color: #d4af37;
    font-size: 15px;
}

.csc-projection-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.csc-projection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #faf9f7;
    border-radius: 8px;
    font-size: 13px;
}

.csc-projection-item-label {
    color: #5f5a56;
}

.csc-projection-item-sub {
    font-size: 11px;
    color: #9e9a96;
}

.csc-projection-item-value {
    font-weight: 600;
    color: #2d2a26;
    white-space: nowrap;
}

.csc-projection-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: linear-gradient(135deg, #fdfbf5, #faf6ec);
    border: 1px solid #e8d48a;
    border-radius: 10px;
}

.csc-projection-total-label {
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
}

.csc-projection-total-value {
    font-size: 18px;
    font-weight: 800;
    color: #d4af37;
    letter-spacing: -0.02em;
}

/* ===== Info section ===== */
.csc-info-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

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

.csc-info-title i {
    color: #d4af37;
    font-size: 15px;
}

.csc-info-block {
    margin-bottom: 12px;
}

.csc-info-block:last-child {
    margin-bottom: 0;
}

.csc-info-block-title {
    font-size: 12px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 6px;
}

.csc-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.csc-info-list li {
    font-size: 12px;
    color: #5f5a56;
    padding-left: 14px;
    position: relative;
    line-height: 1.5;
}

.csc-info-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 5px;
    height: 5px;
    background: #d4af37;
    border-radius: 50%;
}

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

.csc-disclaimer-title {
    font-size: 12px;
    font-weight: 600;
    color: #9e9a96;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.csc-disclaimer-text {
    font-size: 11px;
    color: #9e9a96;
    line-height: 1.6;
}

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

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

    .csc-input-col,
    .csc-result-col {
        width: 100%;
    }

    .csc-amount-input,
    .csc-select {
        font-size: 16px;
    }

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

/* ===== Responsive (mobile) ===== */
@media (max-width: 480px) {
    .csc-main-layout {
        gap: 12px;
    }

    .csc-section {
        padding: 14px;
    }

    .csc-summary-main {
        font-size: 24px;
    }

    .csc-child-card-grid {
        grid-template-columns: 1fr;
    }

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

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

    .csc-btn-group {
        flex-direction: column;
    }

    .csc-calculate-btn,
    .csc-reset-btn {
        width: 100%;
    }

    .csc-projection-total-value {
        font-size: 16px;
    }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    .csc-section,
    .csc-amount-input,
    .csc-select,
    .csc-calculate-btn,
    .csc-radio-label,
    .csc-child-card {
        transition: none !important;
    }

    .csc-section:hover,
    .csc-calculate-btn:hover {
        transform: none !important;
    }
}
