/**
 * Public styles for WC Sponsored Credit
 */

/* Common */
.wcsc-icon {
    font-size: 1.2em;
    margin-right: 5px;
}

/* Cart notice */
.wcsc-cart-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wcsc-cart-notice .wcsc-icon {
    font-size: 1.5em;
}

.wcsc-cart-notice p {
    margin: 0;
    flex: 1;
}

.wcsc-cart-notice strong {
    color: #fff;
}

/* Checkout box */
.wcsc-checkout-box {
    background: #f8f9fa;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.wcsc-checkout-box h3 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #333;
    display: flex;
    align-items: center;
}

.wcsc-checkout-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.wcsc-checkout-info p {
    margin: 0;
    font-size: 0.95em;
}

.wcsc-checkout-toggle {
    padding: 10px 0;
    border-top: 1px solid #ddd;
}

.wcsc-checkout-toggle label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
}

.wcsc-checkout-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.wcsc-remaining-info {
    margin: 15px 0 0 0;
    padding: 10px;
    background: #e8f4fd;
    border-radius: 4px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcsc-remaining-info .dashicons {
    color: #2271b1;
}

/* Balance update animation */
#wcsc-current-balance {
    transition: all 0.3s ease;
}

#wcsc-current-balance.wcsc-balance-updated {
    color: #2271b1 !important;
}

/* Thank you page */
.wcsc-thankyou-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    margin: 30px 0;
    clear: both;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    display: block;
}

.wcsc-thankyou-notice p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.wcsc-thankyou-notice strong {
    color: #fff;
}

/* My Account page */
.wcsc-my-account {
    max-width: 800px;
}

.wcsc-account-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.wcsc-account-header .wcsc-icon {
    font-size: 1.5em;
}

.wcsc-account-header h2 {
    margin: 0;
}

.wcsc-account-card {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wcsc-card-active {
    border-left: 4px solid #28a745;
}

.wcsc-client-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.wcsc-client-message p {
    margin: 0;
    font-size: 1em;
    line-height: 1.5;
}

.wcsc-card-inactive {
    border-left: 4px solid #dc3545;
    background: #fff5f5;
}

.wcsc-card-empty {
    border-left: 4px solid #6c757d;
    background: #f8f9fa;
}

.wcsc-account-balance {
    margin-bottom: 15px;
}

.wcsc-account-balance .label,
.wcsc-account-expiry .label {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 8px;
}

.wcsc-account-balance .amount {
    display: block;
    font-size: 2em;
    font-weight: 700;
    color: #28a745;
    margin-top: 5px;
}

.wcsc-account-expiry .date {
    font-size: 1.1em;
    font-weight: 600;
}

.wcsc-status-message {
    margin: 0;
    font-size: 1.1em;
}

/* History table */
.wcsc-account-history h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.wcsc-history-table {
    width: 100%;
    border-collapse: collapse;
}

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

.wcsc-history-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.9em;
}

.wcsc-history-table td.amount,
.wcsc-history-table th.amount,
.wcsc-history-table td.balance,
.wcsc-history-table th.balance {
    text-align: right;
}

.wcsc-history-table .positive {
    color: #28a745;
    font-weight: 600;
}

.wcsc-history-table .negative {
    color: #dc3545;
    font-weight: 600;
}

/* Coupon conflict */
.wcsc-coupon-conflict {
    opacity: 0.8;
}

.wcsc-coupon-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 12px 15px;
    color: #856404;
    font-size: 0.9em;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}

.wcsc-coupon-warning .dashicons {
    color: #856404;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 600px) {
    .wcsc-checkout-info {
        flex-direction: column;
        gap: 10px;
    }

    .wcsc-history-table th,
    .wcsc-history-table td {
        padding: 8px;
        font-size: 0.9em;
    }

    .wcsc-account-balance .amount {
        font-size: 1.5em;
    }
}
