/* Custom Styles for Warung AP */

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

/* Category Tab Styles */
.category-tab {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    background-color: #f3f4f6;
    color: #4b5563;
}

.category-tab:hover {
    background-color: #e5e7eb;
}

.category-tab.active {
    background-color: #16a34a;
    color: white;
}

/* Menu Card Styles */
.menu-card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    overflow: hidden;
    transition: all 0.3s;
}

.menu-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: rgba(22, 163, 74, 0.2);
    transform: translateY(-2px);
}

.menu-card .menu-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.menu-card.makanan .menu-icon {
    background-color: #dcfce7;
}

.menu-card.tambahan .menu-icon {
    background-color: #fef9c3;
}

.menu-card.camilan .menu-icon {
    background-color: #ffedd5;
}

.menu-card.minuman .menu-icon {
    background-color: #dbeafe;
}

/* Quantity Button Styles */
.qty-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background-color: #f3f4f6;
    color: #4b5563;
}

.qty-btn:hover {
    background-color: #16a34a;
    color: white;
}

.qty-btn:active {
    transform: scale(0.95);
}

/* Add to Cart Button */
.add-to-cart-btn {
    width: 100%;
    padding: 0.5rem 0;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    background-color: #16a34a;
    color: white;
}

.add-to-cart-btn:hover {
    background-color: #15803d;
}

.add-to-cart-btn:active {
    transform: scale(0.98);
}

/* Cart Item Styles */
.cart-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
}

.cart-item-remove {
    padding: 0.25rem;
    color: #9ca3af;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.cart-item-remove:hover {
    color: #ef4444;
    background-color: #fef2f2;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-card {
    animation: slideIn 0.3s ease-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.cart-pulse {
    animation: pulse 0.3s ease-out;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

/* Scrollbar Styles */
#cartItems::-webkit-scrollbar {
    width: 6px;
}

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

#cartItems::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

#cartItems::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Price Tag Style */
.price-tag {
    color: #16a34a;
    font-weight: 700;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-popular {
    background-color: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.badge-new {
    background-color: #dcfce7;
    color: #16a34a;
}

/* Loading State */
.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    background-color: #e5e7eb;
    border-radius: 0.25rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 0;
    color: #6b7280;
}

/* Floating button animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.float-bounce:hover {
    animation: bounce 0.5s ease infinite;
}

/* Menu Image Styles */
.menu-image-container {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background-color: #f3f4f6;
}

.menu-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.menu-card:hover .menu-image {
    transform: scale(1.05);
}

.menu-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
}

.menu-card.makanan .menu-image-placeholder {
    background-color: #dcfce7;
}

.menu-card.tambahan .menu-image-placeholder {
    background-color: #fef9c3;
}

.menu-card.camilan .menu-image-placeholder {
    background-color: #ffedd5;
}

.menu-card.minuman .menu-image-placeholder {
    background-color: #dbeafe;
}

/* Profile Modal Styles */
#profileModal {
    backdrop-filter: blur(4px);
}

#profileModal > div {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Order History Item */
.order-history-item {
    transition: all 0.2s;
}

.order-history-item:hover {
    background-color: #f3f4f6;
}

/* Profile Button Active State */
#profileBtn.bg-primary {
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}
