/**
 * SmartWeb Checkout Styles
 */

/* Checkout Container */
.smartweb-checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-top: 2rem;
}

/* Checkout Form */
.checkout-form-section {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.checkout-form-section h2 {
    margin-bottom: 1.5rem;
    color: #1f2937;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.error {
    border-color: #ef4444;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Payment Methods */
.payment-methods {
    margin-top: 2rem;
}

.payment-method-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method-option:hover {
    border-color: #667eea;
}

.payment-method-option.active {
    border-color: #667eea;
    background: #f3f4f6;
}

.payment-method-option input[type="radio"] {
    margin-right: 1rem;
}

.payment-method-info {
    flex: 1;
}

.payment-method-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.payment-method-info p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.payment-fields {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 8px;
}

/* Order Summary */
.order-summary {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 2rem;
}

.order-summary h2 {
    margin-bottom: 1.5rem;
    color: #1f2937;
    font-size: 1.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.order-totals {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.total-row.final {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.discount-row {
    color: #059669;
}

/* Coupon Form */
.coupon-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.coupon-form input {
    flex: 1;
}

.coupon-form button {
    padding: 0.75rem 1.5rem;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.coupon-form button:hover {
    background: #4b5563;
}

/* Submit Button */
.checkout-submit {
    margin-top: 2rem;
}

.checkout-submit button {
    width: 100%;
    padding: 1rem 2rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.checkout-submit button:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.checkout-submit button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Processing State */
.checkout-form.processing {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.checkout-form.processing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f4f6;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive */
@media (max-width: 768px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
        margin-top: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .checkout-form-section {
        padding: 1.5rem;
    }
}