/**
 * Rewards Cart CSS
 *
 * @package Rewards
 * @subpackage CSS
 * @version 1.0.0
 */

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

/* Cart Header */
.rewards-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.rewards-cart-title {
    font-size: 24px;
    font-weight: 600;
    color: #1A4B7C;
    margin: 0;
}

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

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

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

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

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

.rewards-flash-success {
    background-color: #e8f5e9;
    color: #388e3c;
    border-left: 4px solid #4caf50;
}

.rewards-flash-error {
    background-color: #ffebee;
    color: #d32f2f;
    border-left: 4px solid #f44336;
}

.rewards-flash-info {
    background-color: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #2196f3;
}

/* Empty Cart */
.rewards-cart-empty {
    text-align: center;
    padding: 50px 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 30px;
}

.rewards-cart-empty h3 {
    font-size: 20px;
    color: #555;
    margin-bottom: 15px;
}

.rewards-cart-empty p {
    color: #777;
    margin-bottom: 25px;
}

/* Cart Table */
.rewards-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.rewards-cart-table th {
    background-color: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.rewards-cart-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.rewards-cart-product-image {
    width: 80px;
}

.rewards-cart-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.rewards-cart-product-details {
    padding-left: 15px;
}

.rewards-cart-product-title {
    font-weight: 600;
    font-size: 16px;
    margin: 0 0 5px 0;
}

.rewards-cart-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rewards-cart-product-title a:hover {
    color: #1A4B7C;
}

.rewards-cart-product-meta {
    font-size: 14px;
    color: #777;
}

/* Quantity Controls */
.rewards-quantity-input {
    display: flex;
    align-items: center;
    max-width: 120px;
}

.rewards-quantity-input input {
    width: 50px;
    height: 38px;
    padding: 0 5px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 0;
    -moz-appearance: textfield;
}

.rewards-quantity-input input::-webkit-outer-spin-button,
.rewards-quantity-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.rewards-quantity-minus,
.rewards-quantity-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 38px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
    transition: background-color 0.2s ease;
}

.rewards-quantity-minus {
    border-radius: 4px 0 0 4px;
}

.rewards-quantity-plus {
    border-radius: 0 4px 4px 0;
}

.rewards-quantity-minus:hover,
.rewards-quantity-plus:hover {
    background-color: #e5e5e5;
}

/* Points Display */
.rewards-points {
    font-weight: 600;
    color: #1A4B7C;
    white-space: nowrap;
}

/* Remove Button */
.rewards-remove {
    color: #d32f2f;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    transition: color 0.2s ease;
}

.rewards-remove:hover {
    color: #b71c1c;
    text-decoration: underline;
}

.rewards-remove:before {
    content: '×';
    font-size: 18px;
    margin-right: 5px;
}

/* Cart Actions */
.rewards-cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 30px;
}

.rewards-continue-shopping {
    color: #1A4B7C;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.rewards-continue-shopping:hover {
    color: #0d2a48;
    text-decoration: underline;
}

.rewards-update-cart {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.rewards-update-cart:hover {
    background-color: #e5e5e5;
}

/* Cart Summary */
.rewards-cart-summary {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.rewards-summary-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.rewards-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.rewards-summary-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.rewards-summary-label {
    font-weight: 500;
}

.rewards-summary-value {
    font-weight: 600;
    color: #1A4B7C;
}

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

/* Checkout Button */
.rewards-checkout-button {
    display: block;
    width: 100%;
    background-color: #1A4B7C;
    color: white;
    border: none;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    margin-top: 20px;
    transition: background-color 0.2s ease;
}

.rewards-checkout-button:hover {
    background-color: #0d2a48;
}

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

/* Not Enough Points Notice */
.rewards-not-enough-points {
    background-color: #fff8e1;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid #ffc107;
}

.rewards-not-enough-points p {
    margin: 0;
    color: #856404;
    font-weight: 500;
}

/* Special Offers Section */
.rewards-special-offers {
    margin-top: 50px;
}

.rewards-special-offers-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1A4B7C;
}

.rewards-offers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.rewards-offer-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rewards-offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.rewards-offer-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.rewards-offer-details {
    padding: 15px;
}

.rewards-offer-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

.rewards-offer-points {
    font-weight: 700;
    color: #1A4B7C;
    margin-bottom: 15px;
}

.rewards-add-to-cart {
    display: block;
    width: 100%;
    background-color: #1A4B7C;
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease;
}

.rewards-add-to-cart:hover {
    background-color: #0d2a48;
}

.rewards-add-to-cart:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Loading State */
.rewards-loading {
    position: relative;
    pointer-events: none;
}

.rewards-loading:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 1;
}

.rewards-loading:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(26, 75, 124, 0.3);
    border-top-color: #1A4B7C;
    border-radius: 50%;
    animation: rewards-spin 0.8s infinite linear;
    z-index: 2;
}

@keyframes rewards-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Styles */
@media screen and (max-width: 991px) {
    .rewards-offers-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .rewards-cart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rewards-user-points {
        margin-top: 10px;
    }
    
    .rewards-cart-table {
        display: block;
        overflow-x: auto;
    }
    
    .rewards-offers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rewards-cart-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .rewards-update-cart {
        width: 100%;
        padding: 12px;
    }
}

@media screen and (max-width: 480px) {
    .rewards-offers-grid {
        grid-template-columns: 1fr;
    }
    
    .rewards-cart-product-image {
        display: none;
    }
    
    .rewards-cart-product-details {
        padding-left: 0;
    }
} 