/**
 * Kolk Menukaart Styles
 * Gebaseerd op de Restaurant de Kolk Styleguide
 *
 * Design System: Glassmorphism + Dark Theme
 *
 * Note: CSS variabelen (--kolk-*) worden globaal gedefinieerd in het thema (style.css)
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.kolk-menukaart {
  font-family: ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--kolk-foreground);
}

/* ==========================================================================
   Card Component (.kolk-card)
   Glassmorphism card with blur effect
   ========================================================================== */

.kolk-card {
  border-radius: var(--kolk-radius-lg);
  border: 1px solid rgba(199, 178, 153, 0.2);
  background-color: rgba(42, 47, 56, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.5rem;
  box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.5);
}

.kolk-card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(199, 178, 153, 0.15);
}

.kolk-card-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--kolk-foreground);
  text-align: center;
  margin: 0;
}

.kolk-card-body {
  color: var(--kolk-card-foreground);
}

/* Responsive card padding */
@media (max-width: 640px) {
  .kolk-card {
    padding: 1rem;
  }
}

/* ==========================================================================
   Navigation Tabs (.kolk-nav)
   Capsule-style button group navigation
   ========================================================================== */

.kolk-nav-container {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.kolk-nav {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0.25rem;
  background-color: rgba(29, 33, 39, 0.9);
  border: 1px solid var(--kolk-border);
  border-radius: 9999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.kolk-nav-item {
  margin: 0;
}

.kolk-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background-color: transparent;
  border: none;
  border-radius: 9999px;
  color: var(--kolk-muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.kolk-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--kolk-foreground);
}

.kolk-nav-link:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(199, 178, 153, 0.3);
}

.kolk-nav-link.active {
  background-color: var(--kolk-muted);
  color: var(--kolk-foreground);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Responsive: stack on very small screens */
@media (max-width: 480px) {
  .kolk-nav {
    flex-direction: column;
    border-radius: var(--kolk-radius-lg);
    width: 100%;
    max-width: 280px;
  }

  .kolk-nav-link {
    width: 100%;
    justify-content: center;
    border-radius: var(--kolk-radius);
  }
}

/* ==========================================================================
   Button Components
   ========================================================================== */

.kolk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--kolk-radius);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.kolk-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.kolk-btn-primary {
  background-color: var(--kolk-primary);
  color: var(--kolk-primary-foreground);
  border-color: var(--kolk-primary);
}

.kolk-btn-primary:hover {
  background-color: #b8a389;
  border-color: #b8a389;
}

.kolk-btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(199, 178, 153, 0.3);
}

.kolk-btn-outline {
  background-color: transparent;
  color: var(--kolk-foreground);
  border-color: var(--kolk-input);
}

.kolk-btn-outline:hover {
  background-color: var(--kolk-muted);
  border-color: var(--kolk-primary);
  color: var(--kolk-primary);
}

.kolk-btn-ghost {
  background-color: transparent;
  color: var(--kolk-muted-foreground);
  border-color: transparent;
}

.kolk-btn-ghost:hover {
  background-color: var(--kolk-muted);
  color: var(--kolk-foreground);
}

/* ==========================================================================
   Menu Section Wrapper
   ========================================================================== */

.kolk-menu-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.kolk-menu-section.active {
  display: block;
}

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

/* ==========================================================================
   Menu Title
   ========================================================================== */

.kolk-menu-title {
  font-size: 1.875rem;
  font-weight: 700;
  text-align: center;
  color: var(--kolk-foreground);
  padding: 1.5rem 0;
  margin: 0;
}

@media (min-width: 640px) {
  .kolk-menu-title {
    font-size: 2.25rem;
  }
}

/* ==========================================================================
   Menu Item (Gerecht)
   ========================================================================== */

.kolk-gerecht {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(199, 178, 153, 0.12);
}

/* 2-kolom grid: verberg border bij de laatste 2 items (onderste rij) */
.kolk-gerecht:nth-last-child(-n+2) {
  border-bottom: none;
}

/* 1-kolom (mobile): alleen het allerlaatste item geen border */
@media (max-width: 639px) {
  .kolk-gerecht:nth-last-child(2) {
    border-bottom: 1px solid rgba(199, 178, 153, 0.12);
  }
  .kolk-gerecht:last-child {
    border-bottom: none;
  }
}

.kolk-gerecht-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.kolk-gerecht-naam {
  font-size: 1rem;
  font-weight: 500;
  color: var(--kolk-foreground);
  margin: 0;
  line-height: 1.4;
}

.kolk-gerecht-prijs {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--kolk-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.kolk-gerecht-desc {
  font-size: 0.875rem;
  color: var(--kolk-muted-foreground);
  margin: 0.25rem 0 0 0;
  line-height: 1.5;
}

/* In speciale/additionele menu's gebruiken we alleen de hr dividers */
.kolk-menu-section-special .kolk-gerecht {
  border-bottom: none;
}

/* In weekmenu gebruiken we alleen de hr dividers tussen items */
.kolk-weekmenu-card .kolk-gerecht {
  border-bottom: none;
}

/* ==========================================================================
   Dividers
   ========================================================================== */

.kolk-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(199, 178, 153, 0.3), transparent);
  margin: 1rem 0;
  border: none;
}

.kolk-divider-fade {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(199, 178, 153, 0.3) 50%,
    transparent
  );
}

.kolk-divider-solid {
  background-color: var(--kolk-border);
}

/* Spacer between gangs */
.kolk-gang-spacer {
  width: 100%;
  height: 2rem;
}

/* ==========================================================================
   Gang Header (Voorgerechten, Hoofdgerechten, etc.)
   ========================================================================== */

.kolk-gang-title {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  color: var(--kolk-foreground);
  padding: 1rem 0;
  margin: 0;
}

@media (min-width: 640px) {
  .kolk-gang-title {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   Intro Text Block
   ========================================================================== */

.kolk-intro-text {
  text-align: center;
  padding: 1rem 0;
}

.kolk-intro-text p {
  margin: 0.5rem 0;
}

.kolk-intro-lead {
  font-size: 1rem;
  color: var(--kolk-foreground);
  line-height: 1.6;
}

@media (min-width: 640px) {
  .kolk-intro-lead {
    font-size: 1.125rem;
  }
}

.kolk-intro-prijs {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--kolk-foreground);
}

.kolk-intro-prijs .highlight {
  color: var(--kolk-primary);
}

.kolk-intro-pricing {
  margin-top: 0.9rem;
}

.kolk-price-list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.kolk-price-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0.45rem 0.25rem;
  border-radius: 0;
  background: transparent;
  border: 0;
  text-align: center;
}

.kolk-price-label {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--kolk-primary);
  opacity: 0.92;
}

.kolk-price-value {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0.2rem;
}

.kolk-price-value .highlight {
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--kolk-foreground);
  opacity: 0.95;
}

.kolk-price-value .kolk-intro-small {
  font-size: 0.67rem;
  color: var(--kolk-muted-foreground);
  letter-spacing: 0.01em;
}

.kolk-intro-notes {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
}

.kolk-intro-notes .kolk-intro-small {
  line-height: 1.55;
}

@media (max-width: 768px) {
  .kolk-price-label {
    font-size: 1rem;
  }

  .kolk-price-value .highlight {
    font-size: 1.25rem;
  }
}

@media (max-width: 640px) {
  .kolk-intro-pricing {
    margin-top: 0.85rem;
  }

  .kolk-price-row {
    padding: 0.35rem 0.1rem;
  }

  .kolk-price-label {
    font-size: 0.95rem;
  }

  .kolk-price-value .highlight {
    font-size: 1.1rem;
  }
}

.kolk-intro-small {
  font-size: 0.75rem;
  color: var(--kolk-muted-foreground);
}

/* ==========================================================================
   Badge
   ========================================================================== */

.kolk-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.4rem;
  font-size: 0.6rem;
  font-weight: 500;
  background-color: rgba(199, 178, 153, 0.15);
  color: var(--kolk-primary);
  border-radius: var(--kolk-radius);
  border: 1px solid rgba(199, 178, 153, 0.3);
  position: relative;
  top: -1px;
  left:6px;
  
  /* transform: rotate(12deg); */
  white-space: nowrap;
}

.kolk-badge-optional {
  background-color: rgba(199, 178, 153, 0.1);
  color: var(--kolk-muted-foreground);
  border-color: var(--kolk-border);
}

/* ==========================================================================
   Info Block (Allergenen, etc.)
   ========================================================================== */

.kolk-info-block {
  text-align: center;
  padding: 2rem 1rem;
}

.kolk-info-text {
  font-size: 0.875rem;
  color: var(--kolk-muted-foreground);
  line-height: 1.6;
}

/* ==========================================================================
   Onderblokken Grid (Shared Dining & Weekmenu)
   ========================================================================== */

/* Wanneer weekmenu actief is, shared dining full width en gecentreerd */
.kolk-onderblokken-grid.weekmenu-active {
  grid-template-columns: 1fr;
}

/* .kolk-onderblokken-grid.weekmenu-active .kolk-shared-dining-card {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
} */

/* ==========================================================================
   Grid Layouts
   ========================================================================== */

.kolk-grid {
  display: grid;
  gap: 1.5rem;
}

.kolk-grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .kolk-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kolk-grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .kolk-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Weekmenu Sections (binnen één card)
   ========================================================================== */

.kolk-weekmenu-section {
  padding: 0;
}

/* Verticale divider tussen secties op desktop */
@media (min-width: 768px) {
  .kolk-weekmenu-section:not(:last-child) {
    border-right: 1px solid rgba(199, 178, 153, 0.15);
    padding-right: 1.5rem;
  }
}

/* Horizontale divider tussen secties op mobile */
@media (max-width: 767px) {
  .kolk-weekmenu-section:not(:last-child) {
    border-bottom: 1px solid rgba(199, 178, 153, 0.15);
    padding-bottom: 1.5rem;
  }
}

.kolk-weekmenu-section .kolk-gang-title {
  font-size: 1.125rem;
  text-align: left;
  padding: 0;
  margin-bottom: 1rem;
  color: var(--kolk-primary);
}

/* ==========================================================================
   Bijgerechten
   ========================================================================== */

.kolk-bijgerechten {
  text-align: center;
  padding: 1rem 0;
  margin-top: 1rem;
  border-top: 1px solid rgba(199, 178, 153, 0.15);
}

.kolk-bijgerecht-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  margin: 0.25rem;
  font-size: 0.875rem;
  color: var(--kolk-foreground);
}

.kolk-bijgerecht-item .kolk-gerecht-prijs {
  font-size: 0.875rem;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.kolk-spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--kolk-muted);
  border-top-color: var(--kolk-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.kolk-text-center {
  text-align: center;
}

.kolk-text-muted {
  color: var(--kolk-muted-foreground);
}

.kolk-text-primary {
  color: var(--kolk-primary);
}

.kolk-hidden {
  display: none !important;
}

.kolk-mb-0 { margin-bottom: 0; }
.kolk-mb-4 { margin-bottom: 1rem; }
.kolk-mb-6 { margin-bottom: 1.5rem; }
.kolk-mb-8 { margin-bottom: 2rem; }

.kolk-mt-0 { margin-top: 0; }
.kolk-mt-4 { margin-top: 1rem; }
.kolk-mt-6 { margin-top: 1.5rem; }
.kolk-mt-8 { margin-top: 2rem; }

.kolk-py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.kolk-py-8 { padding-top: 2rem; padding-bottom: 2rem; }

/* ==========================================================================
   Container
   ========================================================================== */

.kolk-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .kolk-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* ==========================================================================
   Header Override (for sticky header)
   ========================================================================== */

.menukaart-page .header-main {
  background-color: var(--kolk-background) !important;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .kolk-card {
    border: 1px solid #ccc;
    background: #fff;
    box-shadow: none;
    backdrop-filter: none;
  }

  .kolk-nav {
    display: none;
  }

  .kolk-menu-section {
    display: block !important;
    page-break-inside: avoid;
  }
}
