/* Fooddle Custom CSS - Complementing Tailwind CSS */

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInFromRight 0.8s ease-out;
}

.animate-slide-in-left {
    animation: slideInFromLeft 0.8s ease-out;
}

.animate-bounce-in {
    animation: bounceIn 0.6s ease-out;
}

/* Custom form styles */
.form-input {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg;
    @apply focus:ring-2 focus:ring-blue-500 focus:border-transparent;
    @apply placeholder-gray-500 text-base font-medium;
    @apply transition-all duration-200;
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input.error {
    @apply border-red-500 bg-red-50;
}

.form-input.success {
    @apply border-green-500 bg-green-50;
}

/* Custom button styles */
.btn-primary {
    @apply bg-blue-800 text-white py-3 px-8 rounded-full;
    @apply hover:bg-blue-900 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2;
    @apply transition-all duration-200 font-medium text-xl;
}

.btn-secondary {
    @apply border border-gray-600 rounded-full hover:bg-white hover:shadow-md;
    @apply transition-all duration-200 font-medium;
}

/* Loading spinner */
.loading-spinner {
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .mobile-full-width {
        width: 100vw;
        margin-left: -1rem;
        margin-right: -1rem;
    }
}

/* Focus styles for accessibility */
.focus-visible:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-food {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Card shadows */
.card-shadow {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-shadow-hover {
    transition: box-shadow 0.3s ease;
}

.card-shadow-hover:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Text gradients */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation styles */
.nav-link-active {
    @apply text-blue-600 font-semibold;
    position: relative;
}

.nav-link-active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: #3b82f6;
    border-radius: 50%;
}

/* Custom checkbox and radio styles */
.custom-checkbox {
    @apply appearance-none border border-gray-300 rounded;
    @apply checked:bg-blue-600 checked:border-blue-600;
    @apply focus:ring-2 focus:ring-blue-500 focus:ring-offset-2;
    width: 20px;
    height: 20px;
    position: relative;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Alert styles */
.alert {
    @apply px-4 py-3 rounded-lg border;
}

.alert-success {
    @apply bg-green-50 text-green-800 border-green-200;
}

.alert-error {
    @apply bg-red-50 text-red-800 border-red-200;
}

.alert-warning {
    @apply bg-yellow-50 text-yellow-800 border-yellow-200;
}

.alert-info {
    @apply bg-blue-50 text-blue-800 border-blue-200;
}

/* Food delivery specific styles */
.delivery-status {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.delivery-status.pending {
    @apply bg-yellow-100 text-yellow-800;
}

.delivery-status.confirmed {
    @apply bg-blue-100 text-blue-800;
}

.delivery-status.preparing {
    @apply bg-orange-100 text-orange-800;
}

.delivery-status.out-for-delivery {
    @apply bg-purple-100 text-purple-800;
}

.delivery-status.delivered {
    @apply bg-green-100 text-green-800;
}

.delivery-status.cancelled {
    @apply bg-red-100 text-red-800;
}

/* Menu item styles */
.menu-item-card {
    @apply bg-white rounded-lg shadow-sm border border-gray-200;
    @apply hover:shadow-md transition-shadow duration-200;
}

.menu-item-image {
    @apply w-full h-48 object-cover rounded-t-lg;
}

.menu-price {
    @apply text-2xl font-bold text-green-600;
}

.menu-price-original {
    @apply text-lg text-gray-500 line-through;
}

/* Responsive grid */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break-before {
        break-before: page;
    }
}