/**
 * ENNU Membership Balance - Frontend Styles
 *
 * @package ENNU\MembershipBalance
 */

/* Balance Card */
.ennu-mb-balance-card {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Checkout Notice */
.ennu-mb-checkout-notice {
    animation: ennuMbFadeIn 0.3s ease;
}

@keyframes ennuMbFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Balance Widget */
.ennu-mb-balance-widget {
    margin-bottom: 15px;
}

/* History Table */
.ennu-mb-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ennu-mb-history-table th,
.ennu-mb-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.ennu-mb-history-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.ennu-mb-history-table tbody tr:hover {
    background: #fafafa;
}

/* Inline Balance */
.ennu-mb-balance-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #d4af37 0%, #f5d76e 100%);
    border-radius: 6px;
    color: #1a1a1a;
    font-size: 14px;
}

/* Minimal Balance */
.ennu-mb-balance-minimal {
    color: #d4af37;
    font-weight: 700;
}

/* Reward Chip (for POS) */
.reward-chip.ennu-balance-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reward-chip.ennu-balance-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.reward-chip .chip-icon {
    font-size: 20px;
}

.reward-chip .chip-label {
    font-size: 13px;
    font-weight: 500;
}

.reward-chip .chip-balance {
    font-size: 15px;
    margin-left: 4px;
}

/* Dashboard Widget */
.ennu-mb-dashboard-widget {
    transition: transform 0.2s ease;
}

.ennu-mb-dashboard-widget:hover {
    transform: translateY(-2px);
}

/* WooCommerce My Account */
.woocommerce-account .ennu-mb-balance-card {
    margin-bottom: 25px;
}

/* Apply Button States */
.ennu-mb-apply-btn {
    transition: all 0.2s ease;
}

.ennu-mb-apply-btn:hover {
    background: #c4a030 !important;
    transform: translateY(-1px);
}

.ennu-mb-apply-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading Spinner */
.ennu-mb-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #d4af37;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ennuMbSpin 0.8s linear infinite;
}

@keyframes ennuMbSpin {
    to { transform: rotate(360deg); }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .ennu-mb-checkout-notice > div {
        flex-direction: column;
        text-align: center;
    }
    
    .ennu-mb-balance-card {
        max-width: 100% !important;
    }
    
    .ennu-mb-history-table {
        font-size: 12px;
    }
    
    .ennu-mb-history-table th,
    .ennu-mb-history-table td {
        padding: 8px;
    }
}

