/* Custom styles for Delicious Restaurant */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        transform: translateY(20px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

@keyframes bounceGentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

.animate-bounce-gentle {
    animation: bounceGentle 2s infinite;
}

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom gradient backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #f2750a 0%, #e35d05 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

/* Hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #f2750a;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e35d05;
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #f2750a;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Vue.js cloak */
[v-cloak] {
    display: none !important;
}

/* Custom focus styles */
.focus-primary:focus {
    outline: none;
    ring: 2px;
    ring-color: #f2750a;
    ring-opacity: 0.5;
    border-color: #f2750a;
}

/* Backdrop blur support */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
}

/* Custom shadows */
.shadow-primary {
    box-shadow: 0 4px 14px 0 rgba(242, 117, 10, 0.15);
}

.shadow-primary-lg {
    box-shadow: 0 10px 25px -3px rgba(242, 117, 10, 0.1), 0 4px 6px -2px rgba(242, 117, 10, 0.05);
}

/* Responsive text */
@media (max-width: 640px) {
    .text-responsive-xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
}

@media (min-width: 641px) {
    .text-responsive-xl {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #f2750a 0%, #e35d05 100%);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(242, 117, 10, 0.15);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e35d05 0%, #bc4508 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -3px rgba(242, 117, 10, 0.2);
}

/* Image lazy loading */
.lazy-image {
    transition: opacity 0.3s;
}

.lazy-image[data-loaded="false"] {
    opacity: 0;
}

.lazy-image[data-loaded="true"] {
    opacity: 1;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000000;
    }
    
    .text-gray-500 {
        color: #333333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Bootstrap Icons enhancements */
.bi {
    vertical-align: -0.125em;
    fill: currentColor;
}

/* Icon animations */
.icon-hover-bounce:hover {
    animation: bounceGentle 0.6s ease-in-out;
}

.icon-hover-rotate:hover {
    transform: rotate(15deg);
    transition: transform 0.3s ease;
}

.icon-hover-scale:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Menu item image styles */
.menu-item-image {
    position: relative;
    overflow: hidden;
}

.menu-item-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #f3f4f6 25%, transparent 25%), 
                linear-gradient(-45deg, #f3f4f6 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f3f4f6 75%), 
                linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.menu-item-image img {
    position: relative;
    z-index: 2;
}

.menu-item-image img[src*="placeholder"],
.menu-item-image img[onerror] {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Default food image placeholder */
.food-placeholder {
    background: linear-gradient(135deg, #fef7ee 0%, #fed7aa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59332;
    font-size: 3rem;
}

.food-placeholder::before {
    content: '🍽️';
    font-size: 4rem;
    opacity: 0.6;
}

/* Image loading states */
.image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Enhanced star ratings */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

.star-rating .bi-star-fill {
    color: #fbbf24;
    filter: drop-shadow(0 1px 2px rgba(251, 191, 36, 0.3));
}

.star-rating .bi-star {
    color: #d1d5db;
}

/* Cart badge animation */
.cart-badge {
    animation: cartBounce 0.6s ease-out;
}

@keyframes cartBounce {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here in the future */
}