/* =====================================================
   WPD Cockpit — Site Stylesheet
   Page-specific overrides & bridges (not layout/chrome)
   Layout lives in layout.css, tokens in base.css.
   ===================================================== */

/* =====================================================
   LOGIN PAGE
   ===================================================== */

.wpd-login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl) var(--spacing);
  background: var(--color-white);
}

.wpd-login-wrap {
  width: 100%;
  max-width: 400px;
}

/* extends .wpd-card — drop the list-card bottom margin so it stays centered.
   On a white page the soft card shadow needs a hairline border to read. */
.wpd-login-card {
  margin-bottom: 0;
  overflow: hidden;
  border: 1px solid var(--color-grey-100);
}

/* Branding lives in the card header — stacked & centered instead of the
   default left-aligned title row, keeping the header's bottom divider. */
.wpd-login-header.wpd-card__header {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--spacing-2xs);
  padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-lg);
}

.wpd-login-card .wpd-card__body {
  padding: var(--spacing-xl);
}

.wpd-login-logo {
  display: block;
  height: 52px;
  width: auto;
  margin: 0 auto var(--spacing);
}

.wpd-login-title {
  font-size: var(--fontsize-h1);
  color: var(--color-titles);
  margin-bottom: var(--spacing-2xs);
}

.wpd-login-subtitle {
  color: var(--color-grey-600);
  font-size: var(--fontsize-small);
}

/* Comfortable inputs + full-width primary action (override the compact 32px
   default that's meant for admin toolbars — too small on the login card). */
.wpd-login-card .wpd-input {
  height: 46px;
  font-size: var(--fontsize-intro);
}

.wpd-login-card .wpd-label {
  font-size: var(--fontsize-body);
}

.wpd-login-card .wpd-button--full {
  height: 46px;
}

.wpd-login-footer {
  margin-top: var(--spacing-lg);
  text-align: center;
}

.wpd-login-link {
  color: var(--color-grey-600);
  font-size: var(--fontsize-small);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.wpd-login-link:hover {
  color: var(--color-brand-1);
}

/* =====================================================
   GRID LAYOUT
   ===================================================== */

.wpd-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing);
}

@media (max-width: 768px) {
  .wpd-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   CHECK ICON (circular)
   ===================================================== */

.wpd-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #d4edda;
  color: #155724;
  font-size: 0.65rem;
}

/* =====================================================
   CHIPS
   ===================================================== */

.wpd-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--color-grey-100);
  color: var(--color-text);
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: nowrap;
}

/* =====================================================
   AFVAARTEN PAGE
   ===================================================== */

.afvaart-row {
  display: block;
  padding: var(--spacing) var(--spacing-lg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast);
}

.afvaart-row:last-child {
  border-bottom: none;
  /* Match the card's rounded bottom corners so the hover background doesn't
     bleed past them (the card uses overflow: visible). */
  border-bottom-left-radius: var(--border-radius-xl);
  border-bottom-right-radius: var(--border-radius-xl);
}

.afvaart-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

.afvaart-row--editable {
  cursor: pointer;
}

.afvaart-row--editable:hover {
  background: rgba(0, 0, 0, 0.04);
}
.afvaart-row--editable:hover .afvaart-edit-icon {
  color: var(--color-brand-1);
}

.afvaart-row--cancelled {
  opacity: 0.5;
}

/* =====================================================
   DASHBOARD STAT CARD ICON
   ===================================================== */

.wpd-stat-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* =====================================================
   UTILITIES / SMALL FIXES
   ===================================================== */

/* Font monospace for IPs and times */
.font-monospace {
  font-family: var(--fontfamily-mono);
}

/* =====================================================
   DROPDOWN BRIDGE
   Views use .dropdown-menu / .dropdown-item (no Bootstrap CSS loaded)
   ===================================================== */

.dropdown {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.dropdown:has(.dropdown-menu.is-open) {
  z-index: 1051;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 1050;
  min-width: 180px;
  background: var(--color-white);
  border: 1px solid var(--color-grey-200);
  border-radius: var(--border-radius);
  padding: var(--spacing-2xs) 0;
  list-style: none;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    opacity 0.15s ease-out,
    transform 0.15s ease-out;
}

.dropdown-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 0.4rem var(--spacing);
  color: #0e0e10;
  text-decoration: none;
  font-size: 0.75rem;
  line-height: 1;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}
.dropdown-item:hover {
  background: var(--color-brand-4);
  color: var(--color-brand-1);
}

.dropdown-divider {
  height: 0;
  border: none;
  border-top: 1px solid var(--color-grey-200);
  margin: var(--spacing-2xs) 0;
}

.dropdown-menu li.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.dropdown-menu li.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Dropdown toggle arrow */
.dropdown-toggle::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 0.45rem;
  vertical-align: middle;
  opacity: 0.65;
  flex-shrink: 0;
}

/* =====================================================
   FILTER CHIPS  (wagenborg.com style)
   ===================================================== */

/* Button element support for wpd-filter__chip */
button.wpd-filter__chip,
button.wpd-filter__chip--active {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  cursor: pointer;
}

/* Ghost dropdown toggle inside filter area → pill chip style */
.wpd-button--ghost.dropdown-toggle {
  padding: 0.3rem 0.55rem 0.3rem 0.9rem;
  border: 1.5px solid #cdd0d4;
  border-radius: 999px;
  background: #fff;
  color: #0e0e10;
  font-size: 0.9rem;
  font-family: "futura-pt", Arial, sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
.wpd-button--ghost.dropdown-toggle:hover {
  border-color: #df091e;
  color: #df091e;
  background: #fff;
}

.wpd-filter {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.wpd-filter__label {
  font-family: "futura-pt", Arial, sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  color: #0e0e10;
  white-space: nowrap;
  margin-right: 0.25rem;
}

.wpd-filter__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 32px;
  padding: 0 0.7rem;
  border: 1px solid var(--color-grey-300);
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-text);
  font-size: var(--fontsize-small);
  font-family: var(--fontfamily-default);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  line-height: 32px;
  transition:
    border-color 0.12s,
    background 0.12s,
    color 0.12s;
}

.wpd-filter__chip:hover {
  border-color: var(--color-brand-1);
  color: var(--color-brand-1);
  text-decoration: none;
}

.wpd-filter__chip--active {
  background: var(--color-brand-1);
  border-color: var(--color-brand-1);
  color: #fff;
}

.wpd-filter__chip--active:hover {
  background: #c4071b;
  border-color: #c4071b;
  color: #fff;
}

.wpd-filter__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: rgb(0 0 0 / 12%);
  color: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.wpd-filter__chip--active .wpd-filter__count {
  background: rgb(255 255 255 / 25%);
}

.wpd-filter__divider {
  width: 1px;
  height: 20px;
  background: var(--color-grey-300);
  align-self: center;
}

/* Reduce right padding when chip contains a count badge or acts as a dropdown toggle */
.wpd-filter__chip:has(.wpd-filter__count),
.wpd-filter__chip.dropdown-toggle {
  padding-right: 0.55rem;
}

/* Dropdown toggle chips: no uppercase, no bold, tighter padding */
.wpd-filter__chip.dropdown-toggle {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  padding-right: 0.35rem;
}

.wpd-filter__chip.dropdown-toggle::after {
  margin-left: 0.3rem;
}

/* =====================================================
   FILTER BAR  (container for search + filter pills)
   ===================================================== */

.wpd-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Dropdown buttons inside the filter bar match input styling */
.wpd-filter-bar .dropdown > .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: var(--spacing-2xs) var(--spacing-xs);
  border: 1px solid var(--color-grey-300);
  border-radius: var(--border-radius-input);
  background: var(--color-white);
  color: var(--color-text);
  font-size: var(--fontsize-small);
  font-family: var(--fontfamily-default);
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  padding-right: 0.35rem;
}

.wpd-filter-bar .dropdown > .dropdown-toggle:hover {
  border-color: var(--color-grey-800);
}

.wpd-filter-bar .dropdown > .dropdown-toggle::after {
  margin-left: 0.3rem;
}

/* =====================================================
   SEARCH WRAP  (input + icon button on the right)
   ===================================================== */

.wpd-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.wpd-search-wrap .wpd-input {
  padding-right: 2.4rem;
  width: 220px;
}

.wpd-search-wrap__btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
  background: none;
  border: none;
  color: var(--color-grey-500);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--border-radius-sm);
  transition:
    background 0.15s,
    color 0.15s;
}

.wpd-search-wrap__btn:hover {
  color: var(--color-brand-1);
  background: rgba(223, 9, 30, 0.07);
}

/* =====================================================
   LEAFLET — hide attribution logo
   ===================================================== */
.leaflet-control-attribution {
  display: none !important;
}

/* Quill editor inside forms */
.ql-container {
  min-height: 200px;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}
.ql-toolbar {
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

/* =====================================================
   UPLOAD DROPZONE
   (replaces repeated inline dashed-border styles)
   ===================================================== */

.upload-dropzone {
  border: 2px dashed #cdd0d4;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragover {
  border-color: var(--color-brand-1);
  background: rgba(223, 9, 30, 0.02);
}

/* Framed thumbnail preview (logos, uploaded images) */
.wpd-thumbnail {
  padding: 0.25rem;
  background-color: var(--color-white);
  border: 1px solid var(--color-grey-300);
  border-radius: 6px;
  max-width: 100%;
  height: auto;
}

/* =====================================================
   TYPE CARD — radio-button card selector
   (Messages, WindMessages, Triggers type pickers)
   ===================================================== */

.wpd-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  border: 2px solid #cdd0d4;
  border-radius: 8px;
  padding: 12px 20px;
  text-align: center;
  min-width: 120px;
  transition:
    border-color 0.15s,
    background 0.15s;
  background: #fff;
}

.wpd-type-card:hover {
  border-color: #999;
}

.wpd-type-card input[type="radio"] {
  display: none;
}

.wpd-type-card .wpd-type-card__icon {
  font-size: 1.5rem;
  color: #999;
  transition: color 0.15s;
}

.wpd-type-card .wpd-type-card__label {
  font-size: 0.8rem;
  font-weight: 600;
}

.wpd-type-card--active {
  border-color: var(--color-brand-1);
  background: rgba(223, 9, 30, 0.03);
}

.wpd-type-card--active .wpd-type-card__icon {
  color: var(--color-brand-1);
}

.wpd-type-card--active:hover {
  border-color: var(--color-brand-1);
}

