/*
  Centraal stylesheet voor Schouten AI.
  Alle styling wordt hier gedefinieerd voor een consistente en
  onderhoudbare applicatie.
*/

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #f9fafb;
  /* Tailwind: bg-gray-50 */
  color: #1f2937;
  /* Tailwind: text-gray-800 */
}

/* =================================
   Header & Navigatie
   ================================= */
.main-header {
  background-color: #1e40af;
  /* Tailwind: bg-blue-800 */
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-logo {
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  margin-right: 2rem;
}

.nav-menu {
  display: none;
  /* Standaard verborgen op mobiel */
}

@media (min-width: 1024px) {

  /* Tailwind 'lg' breakpoint */
  .nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
}

.nav-link {
  color: #bfdbfe;
  /* text-blue-200 */
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  /* rounded-md */
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  display: flex;
  align-items: center;
}

.nav-link:hover {
  background-color: #1d4ed8;
  /* hover:bg-blue-700 */
  color: white;
}

.nav-link.active {
  background-color: #1e3a8a;
  /* bg-blue-900 */
  color: white;
  font-weight: 600;
}

/* Dropdown container */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  z-index: 20;
  margin-top: 0.5rem;
  width: 12rem;
  background-color: white;
  color: #1f2937;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  border-radius: 0.375rem;
  /* Fix voor hover-probleem: gebruik visibility en opacity met een transitie */
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 0.1s, opacity 0.1s linear;
}

.nav-dropdown:hover .nav-dropdown-menu {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.nav-dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.nav-dropdown-item:hover {
  background-color: #f3f4f6;
  /* hover:bg-gray-100 */
}

/* Actieknop in header */
.header-action-btn {
  background-color: white;
  color: #1e40af;
  /* text-blue-800 */
  font-weight: 700;
  border-radius: 9999px;
  /* rounded-full */
  padding: 0.5rem 1.25rem;
  transition: background-color 0.2s ease-in-out;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  font-size: 0.875rem;
}

.header-action-btn:hover {
  background-color: #f3f4f6;
  /* hover:bg-gray-100 */
}

/* Icoon-knoppen in de header */
.nav-icon {
  color: #bfdbfe;
  /* text-blue-200 */
  padding: 0.75rem;
  border-radius: 0.375rem;
  /* rounded-md */
  transition: all 0.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon:hover {
  background-color: #1d4ed8;
  /* hover:bg-blue-700 */
  color: white;
}

/* =================================
   Mobiele Navigatie
   ================================= */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(30, 64, 175, 0.98);
  /* bg-blue-800 met 98% opacity */
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.mobile-menu-overlay.hidden {
  display: none;
}

.mobile-menu-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 3rem;
  color: white;
  line-height: 1;
  font-weight: 300;
}

.mobile-menu-content {
  text-align: left;
  display: inline-block;
}

.mobile-nav-link {
  display: block;
  color: white;
  font-size: 1.5rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
}

.mobile-nav-link.sub-link {
  font-size: 1.25rem;
  color: #bfdbfe;
  /* text-blue-200 */
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.mobile-nav-link.dropdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.mobile-nav-link.dropdown-toggle svg {
  transition: transform 0.2s ease-in-out;
  width: 1.5rem;
  height: 1.5rem;
}

.mobile-nav-link.dropdown-toggle.open svg {
  transform: rotate(180deg);
}

.mobile-dropdown-menu {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  margin-top: 0.25rem;
  overflow: hidden;
}

/* =================================
   Formulieren & Knoppen
   ================================= */
.form-card {
  background-color: white;
  padding: 2rem;
  /* p-8 */
  border-radius: 0.5rem;
  /* rounded-lg */
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.form-title {
  font-size: 1.25rem;
  /* text-xl */
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
  /* border-gray-200 */
}

.form-input {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d1d5db;
  /* border-gray-300 */
  border-radius: 0.375rem;
  /* rounded-md */
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: #3b82f6;
  /* focus:border-blue-500 */
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {

  /* sm breakpoint */
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form-group {
  margin-bottom: 1rem;
}

/* =================================
   Alerts / Meldingen
   ================================= */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1.5rem;
  border-width: 1px;
}

.alert-danger {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.alert-success {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.btn {
  display: inline-block;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-align: center;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-secondary {
  background-color: #e5e7eb;
  color: #1f2937;
}

.btn-secondary:hover {
  background-color: #d1d5db;
}

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

.btn-success:hover {
  background-color: #15803d;
}

.btn-full {
  width: 100%;
}
