/**
 * LatePoint Custom Suite - Frontend Styles
 * Version: 3.0.0
 */

/* ==========================================================================
   MODULE 1: DEPOSIT & ONLINE DISCOUNT
   ========================================================================== */

/* Location Labels */
.lpcs-location-label {
    display: block;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
}

.lpcs-online {
    color: #28a745;
    font-weight: 500;
}

.lpcs-inperson {
    color: #6c757d;
    font-style: italic;
}

/* Hide Full Amount Option */
.lp-payment-portions-w .lp-option[data-value="full"],
.lp-payment-portions-w .lp-option:first-child:not([data-value="deposit"]),
.step-payment-portions-w .lp-option[data-value="full"],
.latepoint-step-content[data-step-code="payment__portions"] .lp-option[data-value="full"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
}

.lp-payment-portions-w .lp-options-grid-two {
    grid-template-columns: 1fr !important;
    max-width: 400px !important;
    margin: 0 auto !important;
}

.lp-payment-portions-w .lp-option[data-value="deposit"] {
    border-color: var(--latepoint-primary-color, #4A90A4) !important;
    background: linear-gradient(135deg, rgba(74, 144, 164, 0.05) 0%, rgba(74, 144, 164, 0.1) 100%) !important;
}

/* Cost Breakdown - Discount Row */
.summary-price-item-w.lpcs-discount-row,
.lp-summary-w .summary-price-item-w[data-type="credit"] {
    color: #28a745 !important;
}

.summary-price-item-w.lpcs-discount-row .spi-name,
.summary-price-item-w.lpcs-discount-row .spi-price {
    color: #28a745 !important;
    font-weight: 500;
}

/* Cost Breakdown - Total Price Row */
.summary-price-item-w.lpcs-total-price {
    border-top: 1px dashed #e0e0e0;
    padding-top: 10px;
    margin-top: 10px;
}

.summary-price-item-w.lpcs-total-price .spi-name,
.summary-price-item-w.lpcs-total-price .spi-price {
    font-weight: 600;
}

/* Cost Breakdown - Deposit Due Row */
.summary-price-item-w.lpcs-deposit-due,
.lp-summary-w .summary-price-item-w.spi-total {
    background: linear-gradient(135deg, rgba(74, 144, 164, 0.08) 0%, rgba(74, 144, 164, 0.15) 100%) !important;
    margin: 12px -15px !important;
    padding: 14px 15px !important;
    border-radius: 8px !important;
    border-top: none !important;
}

.summary-price-item-w.lpcs-deposit-due .spi-name,
.lp-summary-w .summary-price-item-w.spi-total .spi-name {
    color: var(--latepoint-primary-color, #4A90A4) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

.summary-price-item-w.lpcs-deposit-due .spi-price,
.lp-summary-w .summary-price-item-w.spi-total .spi-price {
    color: var(--latepoint-primary-color, #4A90A4) !important;
    font-weight: 700 !important;
    font-size: 18px !important;
}

/* Cost Breakdown - Remaining Balance Row */
.summary-price-item-w.lpcs-remaining-balance,
.summary-price-item-w.spi-sub {
    opacity: 0.8;
    font-style: italic;
}

.summary-price-item-w.lpcs-remaining-balance .spi-name,
.summary-price-item-w.spi-sub .spi-name,
.summary-price-item-w.lpcs-remaining-balance .spi-price,
.summary-price-item-w.spi-sub .spi-price {
    font-size: 13px;
    color: #6B7C8A;
}

/* Deposit Info Notice Box */
.lpcs-deposit-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    margin: 0 0 24px 0;
    background: linear-gradient(135deg, #E8F4F8 0%, #D4ECF4 100%);
    border: 1px solid #B8D4E3;
    border-radius: 12px;
    border-left: 4px solid var(--latepoint-primary-color, #4A90A4);
}

.lpcs-notice-icon {
    flex-shrink: 0;
    color: var(--latepoint-primary-color, #4A90A4);
    margin-top: 2px;
}

.lpcs-notice-icon svg {
    display: block;
}

.lpcs-notice-content {
    font-size: 14px;
    line-height: 1.5;
    color: #2C5F73;
    font-weight: 500;
}

/* Payment Step Enhancement */
.lp-payment-amount-to-pay::after {
    content: "Deposit";
    display: block;
    font-size: 11px;
    color: var(--latepoint-primary-color, #4A90A4);
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* ==========================================================================
   MODULE 2: ACADEMY BUNDLES - VOLUME DISCOUNT BOX
   ========================================================================== */

/* Volume Rates Box - Compact Design */
.lpcs-volume-rates-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
}

.lpcs-volume-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 8px;
    text-align: center;
}

.lpcs-volume-tiers {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lpcs-vol-tier {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.lpcs-vol-tier .lpcs-vol-qty {
    color: #555;
}

.lpcs-vol-tier .lpcs-vol-pct {
    color: #28a745;
    font-weight: 600;
}

/* Active Tier (Reached) */
.lpcs-vol-tier.active {
    background: #d4edda;
    border-color: #28a745;
}

.lpcs-vol-tier.active .lpcs-vol-qty,
.lpcs-vol-tier.active .lpcs-vol-pct {
    color: #155724;
}

/* Next Tier (Target) - highlight only, no arrow */
.lpcs-vol-tier.next {
    background: #fff8e6;
    border-color: #f0ad4e;
}

/* Progress Text */
.lpcs-volume-progress {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
}

.lpcs-volume-progress strong {
    color: #333;
}

/* Volume Discount Row in Cost Breakdown */
.lpcs-volume-discount-row .spi-name,
.lpcs-volume-discount-row .spi-price {
    color: #28a745 !important;
    font-weight: 500;
}


/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 600px) {
    .lpcs-deposit-notice {
        padding: 14px 16px;
        gap: 10px;
    }

    .lpcs-notice-content {
        font-size: 13px;
    }

    .summary-price-item-w.lpcs-deposit-due,
    .lp-summary-w .summary-price-item-w.spi-total {
        margin: 10px -12px !important;
        padding: 12px !important;
    }

    .summary-price-item-w.lpcs-deposit-due .spi-price,
    .lp-summary-w .summary-price-item-w.spi-total .spi-price {
        font-size: 16px !important;
    }

    .lpcs-bundle-progress {
        padding: 12px;
    }

    .lpcs-bundle-title {
        font-size: 14px;
    }

    .lpcs-bundle-table {
        font-size: 12px;
    }

    .lpcs-bundle-table thead th,
    .lpcs-bundle-table tbody td {
        padding: 8px 6px;
    }
}


/* ==========================================================================
   DARK MODE SUPPORT
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .lpcs-deposit-notice {
        background: linear-gradient(135deg, #1A3A47 0%, #1E4555 100%);
        border-color: #2A5566;
    }

    .lpcs-notice-content {
        color: #B8D4E3;
    }

    .summary-price-item-w.lpcs-discount-row .spi-name,
    .summary-price-item-w.lpcs-discount-row .spi-price {
        color: #5cb85c !important;
    }

    .lpcs-volume-rates-box {
        background: #2d3748;
        border-color: #4a5568;
    }

    .lpcs-volume-header {
        color: #a0aec0;
    }

    .lpcs-vol-tier {
        background: #1a202c;
        border-color: #4a5568;
    }

    .lpcs-vol-tier .lpcs-vol-qty {
        color: #e2e8f0;
    }

    .lpcs-vol-tier.active {
        background: #22543d;
        border-color: #48bb78;
    }

    .lpcs-vol-tier.next {
        background: #3d3a2d;
        border-color: #d69e2e;
    }

    .lpcs-volume-progress {
        color: #a0aec0;
        border-color: #4a5568;
    }

    .lpcs-volume-progress strong {
        color: #e2e8f0;
    }
}
