/* ========================================
   DESI DUKAAN - MODERN CHECKOUT STYLES
   ======================================== */

/* Checkout Progress Steps */
.checkout-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin-bottom: 30px;
    border-radius: 12px;
}

.progress-step {
    display: flex;
    align-items: center;
    position: relative;
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #6c757d;
    border: 3px solid #dee2e6;
    transition: all 0.3s ease;
    z-index: 2;
}

.step-icon.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

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

.step-label {
    margin-left: 10px;
    font-weight: 600;
    color: #6c757d;
    font-size: 14px;
}

.step-label.active {
    color: #28a745;
}

.step-connector {
    width: 80px;
    height: 3px;
    background: #dee2e6;
    margin: 0 15px;
}

.step-connector.completed {
    background: #28a745;
}

/* Main Checkout Container */
.checkout-main {
    background: #f8f9fa;
    min-height: 100vh;
    padding-bottom: 50px;
}

.checkout-form-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

/* Checkout Step Headers */
.checkout-step {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.checkout-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.checkout-step h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

/* Address Cards - Improved */
.address-card {
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.address-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0,123,255,0.15);
    transform: translateY(-2px);
}

.address-card.selected {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e9 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.address-card.selected::before {
    content: '✓ Selected';
    position: absolute;
    top: -10px;
    right: 15px;
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.address-type-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.address-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.address-details {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.address-phone {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #28a745;
    font-weight: 600;
    margin-top: 8px;
}

/* Payment Methods - Improved */
.payment-methods {
    display: grid;
    gap: 15px;
}

.payment-option {
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
}

.payment-option:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0,123,255,0.1);
}

.payment-option.selected {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e9 100%);
}

.payment-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #28a745;
}

.payment-icon {
    width: 50px;
    height: 35px;
    object-fit: contain;
}

.payment-label {
    flex: 1;
}

.payment-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.payment-desc {
    font-size: 12px;
    color: #666;
}

/* Order Summary - Improved */
.order-summary-container {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 20px;
}

.order-summary-container h4 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* Cart Items in Summary */
.cart-item-summary {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #f8f9fa;
}

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

.cart-item-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-qty {
    font-size: 12px;
    color: #666;
}

.cart-item-price {
    font-weight: 700;
    color: #28a745;
    white-space: nowrap;
}

/* Order Totals */
.order-totals {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
    border-bottom: 1px dashed #e0e0e0;
}

.order-summary-item:last-child {
    border-bottom: none;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid #333;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.order-summary-item span:last-child {
    font-weight: 600;
}

.free-delivery-badge {
    background: #d4edda;
    color: #155724;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* Place Order Button */
.checkout-action {
    margin-top: 20px;
}

#proceed-to-payment {
    width: 100%;
    padding: 18px 30px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#proceed-to-payment:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

#proceed-to-payment:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Secure Checkout Badge */
.secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    color: #666;
    font-size: 12px;
}

.secure-badge i {
    color: #28a745;
}

/* Terms Checkbox */
.terms-section {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.terms-section .form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #28a745;
}

.terms-section label {
    font-size: 14px;
    color: #666;
}

.terms-section a {
    color: #007bff;
    text-decoration: underline;
}

/* Login Status Alert */
.checkout-login-status .alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    color: #856404;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-icon {
    font-size: 60px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h5 {
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 992px) {
    .order-summary-container {
        position: relative;
        top: 0;
        margin-top: 30px;
    }
    
    .checkout-progress {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .step-connector {
        display: none;
    }
}

@media (max-width: 576px) {
    .checkout-form-container {
        padding: 20px 15px;
    }
    
    .address-card {
        padding: 15px;
    }
    
    .step-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .step-label {
        font-size: 12px;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Distance Info */
.distance-info {
    background: #e3f2fd;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 12px;
    color: #1976d2;
}

/* Address Box Styling (existing class compatibility) */
.address-box {
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.address-box:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0,123,255,0.15);
    transform: translateY(-2px);
}

.address-box.selected {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e9 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.address-box.selected::before {
    content: '✓ Selected';
    position: absolute;
    top: -10px;
    right: 15px;
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.address-selection {
    padding-top: 5px;
}

.address-selection input[type='radio'] {
    width: 20px;
    height: 20px;
    accent-color: #28a745;
}

.address-content {
    flex: 1;
}

.address-content h6 {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.address-content p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.address-content strong {
    color: #333;
}

/* Payment Method Styling Enhancement */
.payment-method-item {
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
}

.payment-method-item:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0,123,255,0.1);
}

.payment-method-item.selected,
.payment-method-item input:checked + label {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e9 100%);
}

.payment-method-item input[type='radio'] {
    width: 20px;
    height: 20px;
    accent-color: #28a745;
}

.payment-method-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
    margin: 0;
}

.payment-method-item img {
    width: 40px;
    height: 30px;
    object-fit: contain;
}

.payment-method-name {
    font-weight: 600;
    color: #333;
}

/* Form Elements */
input[type='text'], 
input[type='email'],
input[type='tel'],
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

input[type='text']:focus, 
input[type='email']:focus,
input[type='tel']:focus,
select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* Alert Styling */
.alert {
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
}

.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
}

.alert-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.alert-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #f57c00;
}

.alert-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
}
