/**
 * PUIUX Checkout Widget Styles
 * Ensures proper styling for the checkout widget
 */

/* Step Navigation */
.step-pane {
    display: none;
}

.step-pane.active {
    display: block;
}

/* Cart Item Styles */
.cart-item {
    transition: opacity 0.3s ease;
}

.cart-item.removing {
    opacity: 0.5;
    pointer-events: none;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-controls button {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-controls button:hover {
    background: #e9ecef;
}

.quantity-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-controls input {
    width: 60px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}

/* Remove Item Button */
.remove-item-btn {
    color: #dc3545;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.remove-item-btn:hover {
    background: #f8d7da;
}

/* Apply Coupon Section */
.coupon-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.coupon-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.apply-btn {
    padding: 10px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.apply-btn:hover {
    background: #005a87;
}

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

/* Payment Button */
#place_order {
    width: 100%;
    padding: 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#place_order:hover {
    background: #218838;
    transform: translateY(-2px);
}

#place_order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Step Indicators */
.step-indicator {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    text-align: center;
    line-height: 30px;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.step-indicator.active {
    background: #007cba;
    color: white;
}

.step-indicator.completed {
    background: #28a745;
    color: white;
}

/* Cart Summary */
.summary-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table td {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
}

.summary-table .total-row {
    font-weight: 600;
    border-top: 2px solid #dee2e6;
}

/* Navigation Buttons */
.cart-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.previous-btn,
.buy-now-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.previous-btn {
    background: #6c757d;
    color: white;
}

.previous-btn:hover {
    background: #5a6268;
}

.previous-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.buy-now-btn {
    background: #007cba;
    color: white;
}

.buy-now-btn:hover {
    background: #005a87;
}

/* Responsive Design */
@media (max-width: 768px) {
    .coupon-row {
        flex-direction: column;
    }
    
    .cart-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .previous-btn,
    .buy-now-btn {
        width: 100%;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Notification Styles */
.puiux-notification {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

/* Payment Method Styles */
.payment-methods {
    margin-bottom: 20px;
}

.payment-method-option {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.payment-method-option .form-check {
    padding: 15px;
    margin: 0;
}

.payment-method-option .form-check-label {
    width: 100%;
    margin: 0;
    cursor: pointer;
}

.payment-box {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
}

/* Form Field Styles */
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.25);
}

.form-check-input {
    margin-right: 8px;
}

.form-check-label {
    cursor: pointer;
}

/* Error States */
.has-error .form-control {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* Success States */
.has-success .form-control {
    border-color: #28a745;
}

.success-message {
    color: #28a745;
    font-size: 12px;
    margin-top: 5px;
} 