/* Custom Checkout Page Styles */
.custom-checkout-container {
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
    padding: 30px 0;
}

.order-item {
    position: relative;
    margin-top: 10px;
}

.order-item.removing {
    opacity: 0.5;
}

/* Default position for desktop/tablet */
.order-item-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.25);
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.order-item-remove-btn:hover {
    background: #e74c3c;
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(231, 76, 60, 0.4);
}

/* Mobile devices - position at left side of product image (fully visible) */
@media (max-width: 768px) {
    .order-item {
        position: relative;
        display: flex;
        gap: 12px;
        overflow: visible;
    }
    
    .order-item-image {
        position: relative;
        margin-left: 12px;
    }
    
    .order-item-remove-btn {
        position: absolute;
        top: -8px;
        left: 0px;
        right: auto;
        width: 24px;
        height: 24px;
        font-size: 12px;
        z-index: 20;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .order-item {
        overflow: visible;
    }
    
    .order-item-image {
        margin-left: 10px;
    }
    
    .order-item-remove-btn {
        top: -6px;
        left: 2px;
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .custom-checkout-container {
        padding: 15px 0;
    }
}

/* Ensure proper spacing for breadcrumb */
.checkout-breadcrumb {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Delivery slot card animations */
.delivery-slot-card,
.order-items-card,
.delivery-address-card,
.checkout-form-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.delivery-slot-card:hover,
.order-items-card:hover,
.delivery-address-card:hover,
.checkout-form-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Order items scrollbar */
.order-items-list::-webkit-scrollbar {
    width: 6px;
}

.order-items-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.order-items-list::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 3px;
}

/* Loading state for confirm button */
.confirm-checkout-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Address modal animations */
.address-modal {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.address-modal-content {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .delivery-slot-card,
    .order-items-card,
    .delivery-address-card,
    .checkout-form-card {
        padding: 15px;
    }
    
    .slot-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .order-item {
        flex-wrap: wrap;
    }
    
    .order-item-quantity {
        margin-left: 75px;
    }
}