/* ============================
   Dynamic Price Calculator - Frontend Styles
   ============================ */

/* Discount Table Wrapper */
.dpc-discount-table-wrap {
    margin: 20px 0;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Header */
.dpc-discount-header {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dpc-offer-icon {
    font-size: 22px;
}

.dpc-discount-header h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.3px;
}

/* Table */
.dpc-discount-table {
    width: 100%;
    border-collapse: collapse;
}

.dpc-discount-table th {
    background: #f8fafc;
    padding: 10px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.dpc-discount-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #334155;
    vertical-align: middle;
}

.dpc-discount-table tr:last-child td {
    border-bottom: none;
}

.dpc-discount-table tbody tr:hover {
    background: #fafbff;
}

/* Active row highlight */
.dpc-discount-table .dpc-row-active {
    background: #f0fdf4 !important;
    border-left: 3px solid #22c55e;
}

.dpc-discount-table .dpc-row-active td:first-child {
    padding-left: 13px;
}

/* Quantity Labels */
.dpc-qty-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #334155;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
}

.dpc-qty-highlight {
    background: #6366f1;
    color: #fff;
    width: auto;
    padding: 0 12px;
    border-radius: 20px;
    font-size: 13px;
}

/* Pricing */
.dpc-discounted-price {
    font-weight: 700;
    color: #059669;
    font-size: 15px;
}

.dpc-original-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 12px;
    margin-left: 6px;
}

.dpc-total-price {
    font-weight: 600;
    color: #1e293b;
}

.dpc-no-save {
    color: #cbd5e1;
}

/* Savings Badge */
.dpc-savings-badge {
    display: inline-block;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #15803d;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #86efac;
}

/* Dynamic price display on product page */
.dpc-dynamic-price-info {
    margin: 12px 0;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    border-radius: 8px;
    font-size: 14px;
    color: #15803d;
    font-weight: 600;
    animation: dpcPulse 0.4s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes dpcPulse {
    0% { transform: scale(0.95); opacity: 0; }
    70% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

.dpc-dynamic-price-info .dpc-save-amount {
    font-weight: 800;
}

/* Cart discount display */
.dpc-cart-discount {
    color: #059669;
    font-weight: 600;
    font-size: 13px;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .dpc-discount-table th,
    .dpc-discount-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .dpc-discount-header {
        padding: 12px 16px;
    }

    .dpc-discount-header h3 {
        font-size: 14px;
    }

    .dpc-savings-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
}
