/* BulaFoodboT - Component Styles */

/* Header Navigation Buttons */
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav-btn-login {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.nav-btn-login:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-light);
  color: #fff;
  transform: translateY(-1px);
}

.nav-btn-create {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.nav-btn-create:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5);
}

@media (max-width: 640px) {
  .nav-btn span {
    display: none; /* Icon only on very small screens to fit location picker and cart */
  }
  .nav-btn {
    padding: 8px 10px;
  }
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-open {
  background: var(--status-open-bg);
  color: var(--status-open);
  border: 1px solid rgba(46, 213, 115, 0.3);
}

.badge-closed {
  background: var(--status-closed-bg);
  color: var(--status-closed);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.badge-popular {
  background: rgba(255, 165, 2, 0.15);
  color: var(--accent);
  border: 1px solid rgba(255, 165, 2, 0.3);
}

.whatsapp-dest-badge {
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: #25D366;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Restaurant Card */
.restaurant-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-normal);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.restaurant-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

.restaurant-cover {
  position: relative;
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: #222;
}

.restaurant-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20,22,31,0.9) 0%, transparent 70%);
}

.restaurant-status {
  position: absolute;
  top: 12px;
  right: 12px;
}

.restaurant-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.restaurant-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.restaurant-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.rating {
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.restaurant-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag {
  background: var(--bg-glass-card);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  border: 1px solid var(--border-color);
}

/* Restaurant Header Display */
.restaurant-header-showcase {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.showcase-banner {
  height: 180px;
  position: relative;
  background-size: cover;
  background-position: center;
}

.back-to-home-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.back-to-home-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.admin-edit-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(37, 211, 102, 0.2);
  backdrop-filter: blur(8px);
  color: #25D366;
  border: 1px solid rgba(37, 211, 102, 0.4);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.admin-edit-btn:hover {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
  box-shadow: 0 0 14px rgba(37, 211, 102, 0.4);
}

.showcase-details {
  padding: 20px;
}

.showcase-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.showcase-title-row h2 {
  font-size: 1.6rem;
  font-weight: 800;
}

.showcase-info-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.showcase-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Category Sticky Pills Bar */
.category-nav-wrapper {
  position: sticky;
  top: 65px;
  z-index: 90;
  background: var(--bg-dark);
  padding: 10px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.category-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.category-pill {
  white-space: nowrap;
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.category-pill:hover, .category-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

/* Dish Card */
.dish-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 14px;
  transition: var(--transition-fast);
  position: relative;
}

.dish-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.dish-img-container {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background-color: #222;
}

.dish-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.dish-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.dish-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.dish-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dish-price {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
}

.add-dish-btn {
  background: var(--primary);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.add-dish-btn:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-glow);
  transform: scale(1.04);
}

/* Floating Bottom Mobile Cart Bar */
.floating-cart-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 500px;
  background: linear-gradient(135deg, var(--primary), #e84118);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 25px rgba(255, 71, 87, 0.4);
  z-index: 150;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.floating-cart-bar:hover {
  transform: translateX(-50%) scale(1.02);
}

.floating-cart-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.floating-cart-count {
  background: rgba(255, 255, 255, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.9rem;
}

.floating-cart-total {
  font-weight: 800;
  font-size: 1.1rem;
}

.floating-cart-action {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Modal Windows */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  width: calc(100% - 32px);
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  z-index: 251;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.modal-overlay.active + .modal-card,
.modal-card.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  outline: none;
}

/* Slide-out Cart Drawer */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: var(--bg-dark);
  border-left: 1px solid var(--border-color);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
}

.drawer-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.close-drawer-btn {
  color: var(--text-muted);
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.close-drawer-btn:hover {
  background: var(--bg-glass-card);
  color: var(--text-main);
}

.drawer-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.cart-item-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.cart-item-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  padding: 4px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--bg-dark);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.qty-btn:hover {
  background: var(--primary);
}

.drawer-footer {
  padding: 20px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.summary-row.total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  margin-top: 10px;
  margin-bottom: 16px;
}

.whatsapp-checkout-btn {
  width: 100%;
  background: #25D366;
  color: #fff;
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  transition: var(--transition-fast);
}

.whatsapp-checkout-btn:hover {
  background: #20ba5a;
  transform: translateY(-2px);
}
