/* CB Save Carts User Styles */

.cb-save-cart-form {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cb-save-cart-form-fields {
    margin-bottom: 20px;
}

.cb-save-cart-form .form-group {
    margin-bottom: 15px;
}

.cb-save-cart-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.cb-form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.cb-form-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

.cb-save-cart-button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.cb-save-cart-button:hover {
    background: #005a87;
}

.cb-save-cart-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.cb-save-cart-loading {
    margin-top: 10px;
    text-align: center;
    color: #666;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cb-save-cart-success {
    text-align: center;
    padding: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
}

.cb-view-saved-carts-button {
    display: inline-block;
    background: #28a745;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.cb-view-saved-carts-button:hover {
    background: #218838;
    color: white;
    text-decoration: none;
}

.cb-save-cart-messages {
    margin-bottom: 15px;
}

.cb-save-cart-messages .message {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.cb-save-cart-messages .message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.cb-save-cart-messages .message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* User Saved Carts List Styles */

.cb-user-saved-carts-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cb-user-saved-carts-list h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
}

.cb-saved-carts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.cb-saved-cart-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cb-saved-cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.cb-saved-cart-item h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.cb-saved-cart-item p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.cb-saved-cart-item .cart-date {
    color: #999;
    font-size: 12px;
}

.cb-saved-cart-item .cart-total {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.cart-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.cb-view-cart-button {
    background: #0073aa;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
    flex: 1;
    text-align: center;
}

.cb-view-cart-button:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.cb-delete-cart-button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.cb-delete-cart-button:hover {
    background: #c82333;
}

.cb-delete-cart-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Saved Cart Detail Styles */

.cb-saved-cart-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.cb-saved-cart-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.cb-saved-cart-items {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.cb-saved-cart-item-detail {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cb-saved-cart-item-detail:last-child {
    border-bottom: none;
}

.cb-saved-cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.cb-saved-cart-item-info {
    flex: 1;
}

.cb-saved-cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.cb-saved-cart-item-price {
    color: #666;
    font-size: 14px;
}

.cb-saved-cart-item-quantity {
    color: #999;
    font-size: 12px;
}

.cb-add-to-cart-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.cb-add-to-cart-button:hover {
    background: #218838;
}

.cb-add-to-cart-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive Design */

@media (max-width: 768px) {
    .cb-saved-carts-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .cb-saved-cart-item-detail {
        flex-direction: column;
        text-align: center;
    }
    
    .cb-saved-cart-item-image {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Success/Error Messages */

.success-message {
    text-align: center;
    padding: 20px;
}

.success-message h3 {
    color: #155724;
    margin-bottom: 10px;
}

.saved-cart-url-container {
    margin: 15px 0;
    text-align: center;
}

.saved-cart-url {
    width: 100%;
    max-width: 400px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    background: #f9f9f9;
}

.copy-url-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.copy-url-button:hover {
    background: #5a6268;
}

.url-note {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
} 