/**
 * Rewards Checkout Styles
 *
 * @package Rewards
 * @subpackage CSS
 * @version 1.0.0
 */

/* Checkout Container */
.rewards-checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Checkout Header */
.rewards-checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e1e1;
}

.rewards-checkout-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #1A4B7C;
}

.rewards-user-points {
    display: flex;
    align-items: center;
    font-size: 16px;
}

.rewards-points-label {
    margin-right: 8px;
    font-weight: 500;
}

.rewards-points-value {
    font-weight: 700;
    color: #1A4B7C;
    font-size: 18px;
}

/* Flash Messages */
.rewards-flash-messages {
    margin-bottom: 20px;
}

.rewards-flash-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: 500;
}

.rewards-flash-success {
    background-color: #e8f5e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

.rewards-flash-error {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.rewards-flash-warning {
    background-color: #fff8e1;
    color: #f57c00;
    border: 1px solid #ffe082;
}

.rewards-flash-info {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

/* Not Enough Points Message */
.rewards-not-enough-points {
    background-color: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.rewards-not-enough-points p {
    margin: 0 0 10px 0;
}

.rewards-not-enough-points p:last-child {
    margin-bottom: 0;
}

/* Checkout Content Layout */
.rewards-checkout-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.rewards-checkout-main {
    flex: 1;
    min-width: 300px;
}

.rewards-checkout-sidebar {
    width: 350px;
}

/* Checkout Sections */
.rewards-checkout-section {
    background-color: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.rewards-checkout-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #1A4B7C;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e1e1;
}

/* Form Styles */
.rewards-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.rewards-form-field {
    flex: 1;
    min-width: 200px;
}

.rewards-form-row-2 .rewards-form-field {
    flex-basis: calc(50% - 7.5px);
}

.rewards-form-row-3 .rewards-form-field {
    flex-basis: calc(33.33% - 10px);
}

.rewards-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.rewards-form-field label .required {
    color: #d32f2f;
}

.rewards-form-field input,
.rewards-form-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.rewards-form-field input:focus,
.rewards-form-field textarea:focus {
    border-color: #1A4B7C;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 75, 124, 0.2);
}

.rewards-field-error {
    border-color: #d32f2f !important;
    background-color: #fff8f8;
}

/* Buttons */
.rewards-checkout-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.rewards-button {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    font-size: 16px;
}

.rewards-button-primary {
    background-color: #1A4B7C;
    color: #fff;
}

.rewards-button-primary:hover {
    background-color: #153d66;
}

.rewards-button-primary:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.rewards-button-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.rewards-button-secondary:hover {
    background-color: #e9e9e9;
}

/* Order Summary */
.rewards-order-summary {
    background-color: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 20px;
}

.rewards-order-summary h2 {
    margin: 0;
    padding: 15px 20px;
    font-size: 20px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e1e1e1;
    color: #1A4B7C;
}

.rewards-order-items {
    padding: 15px 20px;
    max-height: 300px;
    overflow-y: auto;
    border-bottom: 1px solid #e1e1e1;
}

.rewards-order-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.rewards-order-item:last-child {
    border-bottom: none;
}

.rewards-order-item-image {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    position: relative;
}

.rewards-order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.rewards-order-item-quantity {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #1A4B7C;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.rewards-order-item-details {
    flex: 1;
}

.rewards-order-item-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 500;
}

.rewards-order-item-points {
    font-size: 14px;
    color: #666;
}

.rewards-points-amount {
    font-weight: 700;
    color: #1A4B7C;
}

.rewards-order-item-total {
    font-weight: 700;
    color: #1A4B7C;
}

.rewards-order-totals {
    padding: 15px 20px;
}

.rewards-order-subtotal,
.rewards-order-total,
.rewards-order-balance {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.rewards-order-total {
    font-weight: 700;
    padding: 10px 0;
    border-top: 1px solid #e1e1e1;
    border-bottom: 1px solid #e1e1e1;
    margin: 5px 0;
}

.rewards-order-totals-label {
    color: #555;
}

.rewards-order-totals-value {
    font-weight: 500;
}

.rewards-negative-balance {
    color: #d32f2f;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rewards-checkout-content {
        flex-direction: column;
    }
    
    .rewards-checkout-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rewards-user-points {
        margin-top: 10px;
    }
    
    .rewards-checkout-sidebar {
        width: 100%;
        order: -1;
        margin-bottom: 20px;
    }
    
    .rewards-order-summary {
        position: static;
    }
    
    .rewards-form-row-2 .rewards-form-field,
    .rewards-form-row-3 .rewards-form-field {
        flex-basis: 100%;
    }
}

@media (max-width: 480px) {
    .rewards-checkout-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .rewards-button {
        width: 100%;
    }
} 