/* Custom styles for Nogura Ramen Bar */

/* Prevent double-tap zoom on mobile */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

button {
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

/* Larger touch targets for mobile */
.touch-target {
    min-width: 48px;
    min-height: 48px;
}

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

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

/* Cart count badge */
#cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ef4444;
    color: white;
    font-size: 0.75rem;
    border-radius: 50%;
    height: 1.25rem;
    width: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Smooth transitions */
.transition-all {
    transition: all 0.2s ease-in-out;
}

/* Hover effects */
.hover\:bg-gray-800:hover {
    background-color: #1f2937;
}

.hover\:bg-gray-200:hover {
    background-color: #e5e7eb;
}

.hover\:text-gray-300:hover {
    color: #d1d5db;
}

.hover\:text-gray-600:hover {
    color: #4b5563;
}

.hover\:border-gray-300:hover {
    border-color: #d1d5db;
}

.hover\:border-gray-400:hover {
    border-color: #9ca3af;
}

.hover\:shadow-md:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Focus styles */
.focus\:outline-none:focus {
    outline: none;
}

.focus\:ring-2:focus {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5);
}

.focus\:ring-black:focus {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5);
}

.focus\:border-transparent:focus {
    border-color: transparent;
}

/* Custom scrollbar for cart */
#cart-items::-webkit-scrollbar {
    width: 6px;
}

#cart-items::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#cart-items::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#cart-items::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive design */
@media (max-width: 640px) {
    .sm\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .sm\:gap-4 {
        gap: 1rem;
    }
    
    .sm\:justify-start {
        justify-content: flex-start;
    }
    
    .sm\:min-w-\[200px\] {
        min-width: 200px;
    }
    
    .sm\:pr-3 {
        padding-right: 0.75rem;
    }
    
    .sm\:flex-row {
        flex-direction: row;
    }
    
    .sm\:items-center {
        align-items: center;
    }
    
    .sm\:justify-between {
        justify-content: space-between;
    }
    
    .sm\:w-20 {
        width: 5rem;
    }
    
    .sm\:h-20 {
        height: 5rem;
    }
    
    .sm\:w-16 {
        width: 4rem;
    }
    
    .sm\:h-16 {
        height: 4rem;
    }
    
    .sm\:text-2xl {
        font-size: 1.5rem;
    }
}

/* Animation for cart drawer */
#cart-drawer {
    transition: all 0.3s ease-in-out;
}

#cart-drawer[style*="display: none"] {
    opacity: 0;
    visibility: hidden;
}

#cart-drawer:not([style*="display: none"]) {
    opacity: 1;
    visibility: visible;
}

/* Animation for order modal */
#order-modal {
    transition: all 0.3s ease-in-out;
}

#order-modal[style*="display: none"] {
    opacity: 0;
    visibility: hidden;
}

#order-modal:not([style*="display: none"]) {
    opacity: 1;
    visibility: visible;
}

/* Menu item hover effects */
.menu-item {
    transition: all 0.2s ease-in-out;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Button styles */
.btn-primary {
    background-color: #000;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border: 1px solid #d1d5db;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

/* Form styles */
.form-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease-in-out;
}

.form-input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error messages */
.message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

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

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

/* Cart Badge Bounce Animation */
@keyframes cart-badge-bounce {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1.1);
    }
    75% {
        transform: scale(1.2);
    }
}

.cart-badge-bounce {
    animation: cart-badge-bounce 0.6s ease-in-out;
}

/* Cart Bar Pulse Animation */
@keyframes cart-bar-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.cart-bar-pulse {
    animation: cart-bar-pulse 0.6s ease-in-out;
}
