/*
 * Inge - Application-specific Styles
 * Base styles (@font-face, resets, c-icon) and shared component styles
 * (toast, breadcrumb, header dropdowns) are in Go.UI RCL:
 *   /_content/Go.UI/css/go-base.css
 *   /_content/Go.UI/css/go-components.css
 */

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--go-space-4);
  font-weight: 500;
  line-height: var(--go-line-height-heading);
  color: var(--go-text-dark);
}

h1 {
  font-size: var(--go-font-size-h1);
}

h2 {
  font-size: var(--go-font-size-h2);
}

h3 {
  font-size: var(--go-font-size-h3);
}

h4 {
  font-size: var(--go-font-size-h4);
}

p {
  margin-top: 0;
  margin-bottom: var(--go-space-4);
}

/* ==========================================================================
   Links
   ========================================================================== */

a {
  color: var(--go-magenta);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover,
a:focus {
  color: var(--go-magenta-dark);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--go-magenta);
  outline-offset: 2px;
}

/* ==========================================================================
   Focus indicators (accessibility)
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--go-magenta);
  outline-offset: 2px;
}

/* ==========================================================================
   Skip navigation (accessibility)
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--go-space-4);
  z-index: 1000;
  padding: var(--go-space-2) var(--go-space-4);
  background-color: var(--go-magenta);
  color: #FFFFFF;
  font-weight: 500;
  border-radius: var(--go-radius-sm);
  transition: top 0.15s ease-in-out;
}

.skip-link:focus {
  top: var(--go-space-2);
  color: #FFFFFF;
  text-decoration: none;
}

/* ==========================================================================
   GO! Button styles
   ========================================================================== */

.btn-go-primary,
.btn-go-secondary {
  display: inline-block;
  font-family: var(--go-font-family);
  font-size: var(--go-font-size-body);
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  padding: var(--go-space-3) var(--go-space-6);
  border-radius: var(--go-radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out, border-color 0.15s ease-in-out;
  border: 2px solid transparent;
}

.btn-go-primary {
  background-color: var(--go-magenta);
  color: #FFFFFF;
  border-color: var(--go-magenta);
}

.btn-go-primary:hover,
.btn-go-primary:focus {
  background-color: var(--go-magenta-dark);
  border-color: var(--go-magenta-dark);
  color: #FFFFFF;
  text-decoration: none;
}

.btn-go-primary:focus-visible {
  outline: 2px solid var(--go-magenta);
  outline-offset: 2px;
}

.btn-go-secondary {
  background-color: var(--go-background);
  color: var(--go-magenta);
  border-color: var(--go-magenta);
}

.btn-go-secondary:hover,
.btn-go-secondary:focus {
  background-color: var(--go-magenta-bg);
  color: var(--go-magenta-dark);
  border-color: var(--go-magenta-dark);
  text-decoration: none;
}

.btn-go-secondary:focus-visible {
  outline: 2px solid var(--go-magenta);
  outline-offset: 2px;
}

.btn-go-primary:disabled,
.btn-go-secondary:disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.btn-go-danger {
  display: inline-block;
  font-family: var(--go-font-family);
  font-size: var(--go-font-size-body);
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  padding: var(--go-space-3) var(--go-space-6);
  border-radius: var(--go-radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out, border-color 0.15s ease-in-out;
  border: 2px solid transparent;
  background-color: var(--go-error);
  color: #FFFFFF;
  border-color: var(--go-error);
}

.btn-go-danger:hover,
.btn-go-danger:focus {
  background-color: #B71C1C;
  border-color: #B71C1C;
  color: #FFFFFF;
  text-decoration: none;
}

.btn-go-danger:focus-visible {
  outline: 2px solid var(--go-error);
  outline-offset: 2px;
}

.btn-go-danger:disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* ==========================================================================
   GO! Filter pills
   ========================================================================== */

.go-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--go-space-4);
}

.go-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid var(--go-magenta);
  color: var(--go-magenta);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
}

.go-filter-pill:hover,
.go-filter-pill.active {
  background: var(--go-magenta);
  color: #fff;
}

/* ==========================================================================
   GO! Date badge
   ========================================================================== */

.go-date-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--go-magenta);
  border-radius: 4px;
  color: var(--go-magenta);
  font-weight: 700;
  line-height: 1.2;
}

.go-date-badge__day {
  font-size: 1.25rem;
}

.go-date-badge__month {
  font-size: 0.625rem;
  text-transform: uppercase;
}

/* ==========================================================================
   GO! Content card with metadata footer
   ========================================================================== */

.go-content-card {
  border: 1px solid var(--go-border, #dee2e6);
  border-radius: var(--go-radius, 4px);
  padding: var(--go-space-4);
  background: #fff;
}

.go-card-footer {
  background: var(--go-turquoise-bg, #e8f8f5);
  padding: var(--go-space-3) var(--go-space-4);
  border-radius: 0 0 var(--go-radius, 4px) var(--go-radius, 4px);
  margin: var(--go-space-4) calc(-1 * var(--go-space-4)) calc(-1 * var(--go-space-4));
}

/* ==========================================================================
   GO! Status badge
   ========================================================================== */

.go-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid currentColor;
}

.go-status-badge--concept { color: var(--go-text-secondary, #6c757d); }
.go-status-badge--preparation { color: var(--go-info, #0dcaf0); }
.go-status-badge--published { color: var(--go-success, #198754); }
.go-status-badge--closed { color: var(--go-warning, #ffc107); }
.go-status-badge--completed { color: var(--go-purple); }
.go-status-badge--cancelled { color: var(--go-error, #dc3545); }
.go-status-badge--archived { color: var(--go-text-secondary, #6c757d); }

/* ==========================================================================
   GO! Badge styles
   ========================================================================== */

.go-badge {
  display: inline-block;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.go-badge-teal,
.badge.go-badge-teal {
  color: var(--go-teal);
  background-color: var(--go-turquoise-bg);
}

.go-badge-purple,
.badge.go-badge-purple {
  color: #fff;
  background-color: var(--go-purple-light);
}

.go-badge-success {
  color: #fff;
  background-color: var(--go-success);
}

.go-badge-error {
  color: #fff;
  background-color: var(--go-error);
}

.go-badge-secondary {
  color: var(--go-text-secondary);
  background-color: var(--go-surface-alt);
}

/* ==========================================================================
   GO! Sidebar layout
   ========================================================================== */

.go-sidebar-layout {
  display: flex;
  gap: var(--go-space-8);
}

.go-sidebar {
  flex: 0 0 260px;
  min-width: 0;
  background-color: var(--go-surface);
  border-radius: var(--go-radius-md);
  padding: var(--go-space-4);
}

/* Split variant: sidebar becomes a transparent container with separate panels */
.go-sidebar--split {
  display: flex;
  flex-direction: column;
  gap: var(--go-space-4);
  background-color: transparent;
  border-radius: 0;
  padding: 0;
}

.go-sidebar__divider {
  border: none;
  border-top: 1px solid var(--go-border);
  margin: var(--go-space-4) 0;
}

/* ==========================================================================
   GO! Floating field — mirrors GoCombobox for plain text inputs.
   Uses fieldset/legend for the border notch, identical to GoCombobox.
   ========================================================================== */

.go-floating-field {
  position: relative;
  display: flex;
  align-items: center;
  border: none;
  border-radius: var(--go-radius-sm);
  background: transparent;
  outline: none;
  transition: border-color 0.2s ease;
}

.go-floating-field__fieldset {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0 var(--go-space-1);
  border: 1px solid var(--go-border-strong);
  border-radius: var(--go-radius-sm);
  pointer-events: none;
  overflow: hidden;
  appearance: none;
  transition: border-color 0.2s ease;
}

.go-floating-field__fieldset:focus { outline: none; }

.go-floating-field__legend {
  display: block;
  overflow: hidden;
  max-width: 0.01px;
  height: 0;
  padding: 0;
  font-size: calc(var(--go-font-size-body) * 0.75);
  white-space: nowrap;
  visibility: hidden;
  transition: max-width 0.2s ease;
}

.go-floating-field:focus-within > .go-floating-field__fieldset > .go-floating-field__legend,
.go-floating-field--has-value > .go-floating-field__fieldset > .go-floating-field__legend {
  max-width: 100%;
  padding: 0 var(--go-space-2) 0 var(--go-space-1);
}

.go-floating-field:focus-within > .go-floating-field__fieldset {
  border-color: var(--go-magenta);
  border-width: 2px;
}

.go-floating-field__input {
  flex: 1;
  min-width: 0;
  padding: var(--go-space-3);
  font-family: var(--go-font-family);
  font-size: var(--go-font-size-body);
  line-height: var(--go-line-height-compact);
  color: var(--go-text-primary);
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  caret-color: var(--go-magenta);
}

.go-floating-field__input::placeholder {
  color: transparent;
}

.go-floating-field:focus-within .go-floating-field__input::placeholder {
  color: var(--go-text-disabled);
  transition: color 0.2s ease 0.1s;
}

.go-floating-field__label {
  position: absolute;
  top: 50%;
  left: var(--go-space-3);
  transform: translateY(-50%);
  font-family: var(--go-font-family);
  font-size: var(--go-font-size-body);
  color: var(--go-text-secondary);
  pointer-events: none;
  transform-origin: left top;
  transition: all 0.2s ease;
  white-space: nowrap;
  z-index: 1;
}

.go-floating-field:focus-within > .go-floating-field__label {
  top: 0;
  left: 6px;
  transform: translateY(-38%) scale(0.75);
  color: var(--go-magenta);
  padding: 0 var(--go-space-2);
}

.go-floating-field--has-value > .go-floating-field__label {
  top: 0;
  left: 6px;
  transform: translateY(-38%) scale(0.75);
  padding: 0 var(--go-space-2);
}

/* Disabled state */
.go-floating-field:has(input:disabled) > .go-floating-field__fieldset {
  border-color: var(--go-border);
}

.go-floating-field__input:disabled {
  color: var(--go-text-primary);
  -webkit-text-fill-color: var(--go-text-primary);
  opacity: 1;
  cursor: default;
  background: transparent;
}

/* ==========================================================================
   GO! Field display — read-only label+value matching go-floating-field dimensions.
   Seamless transition to editable go-floating-field.
   ========================================================================== */

.go-field-display {
  padding: var(--go-space-1) 0;
}

.go-field-display__label {
  display: block;
  font-family: var(--go-font-family);
  font-size: calc(var(--go-font-size-body) * 0.75);
  color: var(--go-text-secondary);
  margin-bottom: 2px;
}

.go-field-display__value {
  display: block;
  font-family: var(--go-font-family);
  font-size: var(--go-font-size-body);
  color: var(--go-text-primary);
  line-height: var(--go-line-height-compact);
  min-height: calc(var(--go-font-size-body) * 1.4);
}

.go-sidebar-content {
  flex: 1;
  min-width: 0;
}

@media (max-width: 991.98px) {
  .go-sidebar-layout {
    flex-direction: column;
  }

  .go-sidebar {
    flex: none;
  }
}

/* ==========================================================================
   GO! Tab styling
   ========================================================================== */

.go-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  list-style: none;
  padding-left: 0;
  margin-top: 0;
  margin-bottom: var(--go-space-6);
  border-bottom: 2px solid var(--go-border);
}

.go-tabs > li {
  display: flex;
  margin-bottom: -2px;
}

.go-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--go-space-1);
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--go-text-secondary);
  font-weight: 400;
  font-size: 16px;
  padding: var(--go-space-3) var(--go-space-4);
}

.go-tabs .nav-link.active {
  color: var(--go-text-dark);
  font-weight: 700;
  border-bottom-color: var(--go-magenta);
  background: none;
}

.go-tabs .nav-link {
  transition: background-color 0.15s ease, border-bottom-color 0.15s ease, color 0.15s ease;
  border-radius: var(--go-radius-sm) var(--go-radius-sm) 0 0;
  cursor: pointer;
}

.go-tabs .nav-link:hover:not(.active) {
  color: var(--go-text-primary);
  background-color: var(--go-surface);
  border-bottom-color: var(--go-border-strong);
}

/* ==========================================================================
   Table base styles
   ========================================================================== */

.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--go-space-6);
}

.table th,
.table td {
  padding: var(--go-space-3) var(--go-space-4);
  text-align: left;
  vertical-align: top;
}

.table thead th {
  font-weight: 500;
  color: var(--go-text-dark);
  border-bottom: 2px solid var(--go-border-strong);
}

.table tbody tr {
  border-bottom: 1px solid var(--go-border);
}

.table-hover tbody tr:hover {
  background-color: var(--go-surface-alt);
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-sm th,
.table-sm td {
  padding: var(--go-space-2) var(--go-space-3);
}

.table-bordered {
  border: 1px solid var(--go-border);
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--go-border);
}

/* ==========================================================================
   Table cell utilities — truncation, responsive visibility, frozen column
   ========================================================================== */

/* Truncate cell text with ellipsis — add title attribute for tooltip */
.go-cell-truncate--email { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.go-cell-truncate--name  { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.go-cell-truncate--text  { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Prevent action buttons from wrapping */
.go-cell-actions { white-space: nowrap; }

/* Responsive column visibility */
@media (max-width: 767.98px)  { .go-col-hide-mobile { display: none !important; } }
@media (max-width: 991.98px)  { .go-col-hide-tablet { display: none !important; } }

/* Frozen first column for wide tables (e.g. permission matrix) */
.go-table-frozen-col th:first-child,
.go-table-frozen-col td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background-color: var(--go-background);
}

.go-table-frozen-col thead th:first-child {
  z-index: 2;
}

.go-table-frozen-col th:first-child::after,
.go-table-frozen-col td:first-child::after {
  content: "";
  position: absolute;
  top: 0;
  right: -4px;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to right, rgba(0,0,0,0.06), transparent);
  pointer-events: none;
}

/* Rotated column headers for compact matrix tables (e.g. permission matrix) */
.go-table-rotated-header th:not(:first-child) {
  width: 40px;
  height: 90px;
  vertical-align: bottom;
  padding-bottom: 8px;
  text-align: center;
}

.go-table-rotated-header th:not(:first-child) span {
  display: block;
  transform: rotate(-45deg);
  transform-origin: bottom left;
  white-space: nowrap;
  font-size: 0.85rem;
  padding-left: 4px;
}

/* ==========================================================================
   Form controls
   ========================================================================== */

.form-label {
  display: block;
  margin-bottom: var(--go-space-2);
  font-weight: 500;
  color: var(--go-text-dark);
}

.form-control {
  display: block;
  width: 100%;
  padding: var(--go-space-2) var(--go-space-3);
  font-family: var(--go-font-family);
  font-size: var(--go-font-size-body);
  line-height: 1.5;
  color: var(--go-text-primary);
  background-color: var(--go-background);
  border: 1px solid var(--go-border-strong);
  border-radius: var(--go-radius-sm);
  transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
  border-color: var(--go-magenta);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(var(--go-magenta-rgb, 229, 0, 125), 0.15);
}

.form-control::placeholder {
  color: var(--go-text-muted);
  opacity: 1;
}

/* ==========================================================================
   Card
   ========================================================================== */

.card {
  background-color: var(--go-background);
  border: 1px solid var(--go-border);
  border-radius: var(--go-radius-md);
}

.card-header {
  padding: var(--go-space-3) var(--go-space-4);
  background-color: var(--go-surface-alt);
  border-bottom: 1px solid var(--go-border);
}

.card-header:first-child {
  border-radius: calc(var(--go-radius-md) - 1px) calc(var(--go-radius-md) - 1px) 0 0;
}

.card-body {
  padding: var(--go-space-4);
}

/* ==========================================================================
   Alert
   ========================================================================== */

.alert {
  position: relative;
  padding: var(--go-space-3) var(--go-space-4);
  margin-bottom: var(--go-space-4);
  border: 1px solid transparent;
  border-radius: var(--go-radius-sm);
}

.alert-danger {
  color: #842029;
  background-color: #f8d7da;
  border-color: #f5c2c7;
}

.alert-success {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #badbcc;
}

.alert-dismissible {
  padding-right: 3rem;
}

.btn-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  padding: var(--go-space-3) var(--go-space-4);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: inherit;
  opacity: 0.5;
}

.btn-close:hover {
  opacity: 0.75;
}

/* ==========================================================================
   Utility classes
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.text-danger {
  color: var(--go-error);
}

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

.fw-bold {
  font-weight: 700;
}

.w-100 {
  width: 100%;
}

.d-inline-block {
  display: inline-block;
}

.d-none {
  display: none;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--go-space-1); }
.mb-2 { margin-bottom: var(--go-space-2); }
.mb-3 { margin-bottom: var(--go-space-3); }
.mb-4 { margin-bottom: var(--go-space-4); }
.mt-2 { margin-top: var(--go-space-2); }
.mt-4 { margin-top: var(--go-space-4); }
.my-4 { margin-top: var(--go-space-4); margin-bottom: var(--go-space-4); }

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(var(--go-space-4) / -2);
  margin-left: calc(var(--go-space-4) / -2);
}

.col-md-8 {
  flex: 0 0 66.6667%;
  max-width: 66.6667%;
  padding-right: calc(var(--go-space-4) / 2);
  padding-left: calc(var(--go-space-4) / 2);
}

.list-group {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--go-border);
  border-radius: var(--go-radius-sm);
}

.list-group-item {
  display: block;
  padding: var(--go-space-2) var(--go-space-3);
  border-bottom: 1px solid var(--go-border);
  cursor: pointer;
}

.list-group-item:last-child {
  border-bottom: 0;
}

.list-group-item:hover {
  background-color: var(--go-surface-alt);
}

/* ==========================================================================
   GO! Outline button
   ========================================================================== */

.btn-go-outline {
  display: inline-block;
  font-family: var(--go-font-family);
  font-size: var(--go-font-size-body);
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  padding: var(--go-space-3) var(--go-space-6);
  border-radius: var(--go-radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out, border-color 0.15s ease-in-out;
  border: 2px solid var(--go-magenta);
  color: var(--go-magenta);
  background-color: transparent;
}

.btn-go-outline:hover,
.btn-go-outline:focus {
  background-color: var(--go-magenta);
  color: #FFFFFF;
  text-decoration: none;
}

.btn-go-outline:focus-visible {
  outline: 2px solid var(--go-magenta);
  outline-offset: 2px;
}

.btn-go-outline:disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* Compact button size modifier */
.btn-sm {
  font-size: var(--go-font-size-sm);
  padding: var(--go-space-1) var(--go-space-3);
  line-height: 1.4;
}

.go-badge-warning {
  color: #663c00;
  background-color: #fff3cd;
}

.go-badge-info {
  color: #fff;
  background-color: var(--go-info);
}

/* ==========================================================================
   GO! Modal dialog (legacy — for inline modals not yet migrated to GoModal RCL)
   New modals should use <GoModal> component from Go.UI instead.
   ========================================================================== */

.go-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
}

.go-modal {
  background: var(--go-background);
  border-radius: var(--go-radius-md);
  border-left: 4px solid var(--go-magenta);
  padding: var(--go-space-6);
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.go-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--go-space-4);
}

.go-modal__title {
  font-size: var(--go-font-size-h4);
  font-weight: 700;
  color: var(--go-text-dark);
  margin: 0;
}

.go-modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--go-text-secondary);
  padding: 0;
  line-height: 1;
}

.go-modal__close:hover {
  color: var(--go-text-dark);
}

.go-modal__body {
  margin-bottom: var(--go-space-6);
}

.go-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--go-space-3);
}

/* ==========================================================================
   GO! Pagination
   ========================================================================== */

.go-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--go-space-1);
  margin-top: var(--go-space-6);
}

.go-pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--go-space-2);
  border: 1px solid var(--go-border);
  border-radius: var(--go-radius-sm);
  background: var(--go-background);
  color: var(--go-text-primary);
  font-size: var(--go-font-size-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.go-pagination__btn:hover {
  background: var(--go-surface-alt);
  border-color: var(--go-border-strong);
  text-decoration: none;
}

.go-pagination__btn--active {
  background: var(--go-magenta);
  color: #FFFFFF;
  border-color: var(--go-magenta);
}

.go-pagination__btn--active:hover {
  background: var(--go-magenta-dark);
  border-color: var(--go-magenta-dark);
}

.go-pagination__btn:disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.go-pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  font-size: var(--go-font-size-sm);
  color: var(--go-text-muted, #999);
  user-select: none;
}

.go-pagination__summary {
  text-align: center;
  margin-top: var(--go-space-2, 8px);
  font-size: var(--go-font-size-xs, 12px);
  color: var(--go-text-muted, #999);
}

/* ==========================================================================
   GO! Floating label
   ========================================================================== */

.go-floating-label {
  position: relative;
}

.go-floating-label .form-control,
.go-floating-label .form-select {
  padding-top: 20px;
  padding-bottom: 6px;
}

.go-floating-label label {
  position: absolute;
  top: 50%;
  left: var(--go-space-3);
  transform: translateY(-50%);
  font-size: var(--go-font-size-body);
  color: var(--go-text-secondary);
  pointer-events: none;
  transition: all 0.2s ease;
  transform-origin: left top;
}

.go-floating-label .form-control:focus ~ label,
.go-floating-label .form-control:not(:placeholder-shown) ~ label,
.go-floating-label .form-select:focus ~ label,
.go-floating-label .form-select.has-value ~ label,
.go-floating-label label.active {
  top: 0;
  transform: translateY(-50%) scale(0.8);
  color: var(--go-magenta);
  background: var(--go-background);
  padding: 0 4px;
}

/* Textarea floating labels: position label at top instead of vertical center */
.go-floating-label--textarea label {
  top: 14px;
  transform: translateY(0);
}

.go-floating-label--textarea .form-control:focus ~ label,
.go-floating-label--textarea .form-control:not(:placeholder-shown) ~ label,
.go-floating-label--textarea label.active {
  top: 0;
  transform: translateY(-50%) scale(0.8);
}

/* ==========================================================================
   GO! Empty state
   ========================================================================== */

.go-empty-state {
  text-align: center;
  padding: var(--go-space-8);
  background: var(--go-surface);
  border-radius: var(--go-radius-sm);
  color: var(--go-text-secondary);
}

/* ==========================================================================
   GO! Warning banner
   ========================================================================== */

.alert-warning {
  color: #664d03;
  background-color: #fff3cd;
  border-color: #ffecb5;
}

.alert-info {
  color: #055160;
  background-color: #cff4fc;
  border-color: #b6effb;
}

/* ==========================================================================
   Form select
   ========================================================================== */

.form-select {
  display: block;
  width: 100%;
  padding: var(--go-space-2) var(--go-space-8) var(--go-space-2) var(--go-space-3);
  font-family: var(--go-font-family);
  font-size: var(--go-font-size-body);
  line-height: 1.5;
  color: var(--go-text-primary);
  background-color: var(--go-background);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right var(--go-space-3) center;
  background-size: 16px 12px;
  border: 1px solid var(--go-border-strong);
  border-radius: var(--go-radius-sm);
  appearance: none;
  transition: border-color 0.15s ease-in-out;
}

.form-select:focus {
  border-color: var(--go-magenta);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(195, 0, 74, 0.15);
}

/* ==========================================================================
   Additional layout utilities
   ========================================================================== */

.d-flex { display: flex; }
.d-block { display: block; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.align-items-start { align-items: flex-start; }
.align-middle { vertical-align: middle; }
.gap-2 { gap: var(--go-space-2); }
.gap-3 { gap: var(--go-space-3); }

/* Spacing utilities */
.me-1 { margin-right: var(--go-space-1); }
.me-2 { margin-right: var(--go-space-2); }
.ms-1 { margin-left: var(--go-space-1); }
.ms-2 { margin-left: var(--go-space-2); }
.ms-3 { margin-left: var(--go-space-3); }
.mt-1 { margin-top: var(--go-space-1); }
.mt-3 { margin-top: var(--go-space-3); }
.p-4 { padding: var(--go-space-4); }

/* Grid columns */
.g-2 { gap: var(--go-space-2); }
.g-3 { gap: var(--go-space-3); }

.col-md-2, .col-md-3, .col-md-4, .col-md-5 {
  padding-right: calc(var(--go-space-4) / 2);
  padding-left: calc(var(--go-space-4) / 2);
}

@media (min-width: 768px) {
  .col-md-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-md-5 { flex: 0 0 41.6667%; max-width: 41.6667%; }
}

/* Typography utilities */
.h3 { font-size: var(--go-font-size-h3); font-weight: 500; }
.h5 { font-size: var(--go-font-size-body); font-weight: 500; }
.small { font-size: var(--go-font-size-sm); }
.fst-italic { font-style: italic; }
.text-dark { color: var(--go-text-dark); }

/* Nav (tab container) */
.nav { display: flex; flex-wrap: wrap; padding-left: 0; list-style: none; }
.nav-item { display: list-item; background: transparent; }
.nav-link {
  display: block;
  padding: var(--go-space-2) var(--go-space-4);
  color: var(--go-text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--go-font-family);
  font-size: var(--go-font-size-body);
}

/* Bootstrap-compatible badge (for pages not yet refactored) */
.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--go-radius-sm);
  line-height: 1.4;
}

.bg-success { background-color: var(--go-success); color: #fff; }
.bg-secondary { background-color: var(--go-text-secondary); color: #fff; }
.bg-primary { background-color: var(--go-magenta); color: #fff; }
.bg-warning { background-color: var(--go-warning); color: #fff; }
.bg-info { background-color: var(--go-info); color: #fff; }
.bg-danger { background-color: var(--go-error); color: #fff; }

/* Code styling */
code {
  font-size: var(--go-font-size-sm);
  color: var(--go-magenta-dark);
  background: var(--go-surface-alt);
  padding: 2px 6px;
  border-radius: 3px;
}

/* Form control size variants */
.form-control-sm, .form-select-sm {
  font-size: var(--go-font-size-sm);
  padding: var(--go-space-1) var(--go-space-2);
}

.form-label-sm {
  font-size: var(--go-font-size-sm);
}

/* GO! Dropdown menu */
.go-dropdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
}

.go-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  min-width: 160px;
  margin-top: var(--go-space-1);
  padding: var(--go-space-1) 0;
  background: var(--go-background);
  border: 1px solid var(--go-border);
  border-radius: var(--go-radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.go-dropdown-item {
  display: block;
  width: 100%;
  padding: var(--go-space-2) var(--go-space-4);
  font-family: var(--go-font-family);
  font-size: var(--go-font-size-body);
  color: var(--go-text-primary);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.go-dropdown-item:hover {
  background-color: var(--go-surface-alt);
  color: var(--go-text-dark);
}

/* Page title bar */
.go-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--go-space-2);
}

.go-page-header h1 {
  margin-bottom: 0;
}

/* Breadcrumb + version indicator on same baseline */
.go-breadcrumb-inline nav {
  display: contents;
}

.go-breadcrumb-inline .go-breadcrumb {
  margin: 0;
}

/* ==========================================================================
   GO! Textarea — floating-label textarea matching GoTextField visual style
   ========================================================================== */

.go-textarea {
  position: relative;
  display: flex;
  border-radius: var(--go-radius-sm);
  background: transparent;
  transition: border-color 0.2s ease;
}

.go-textarea__fieldset {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0 var(--go-space-1);
  border: 1px solid var(--go-border-strong);
  border-radius: var(--go-radius-sm);
  pointer-events: none;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.go-textarea__legend {
  display: block;
  overflow: hidden;
  max-width: 0.01px;
  height: 0;
  padding: 0;
  font-size: calc(var(--go-font-size-body) * 0.75);
  white-space: nowrap;
  visibility: hidden;
  transition: max-width 0.2s ease;
}

.go-textarea:focus-within > .go-textarea__fieldset > .go-textarea__legend,
.go-textarea--has-value > .go-textarea__fieldset > .go-textarea__legend {
  max-width: 100%;
  padding: 0 var(--go-space-2) 0 var(--go-space-1);
}

.go-textarea:focus-within > .go-textarea__fieldset {
  border-color: var(--go-magenta);
  border-width: 2px;
}

.go-textarea__input {
  flex: 1;
  width: 100%;
  padding: var(--go-space-3);
  font-family: var(--go-font-family);
  font-size: var(--go-font-size-body);
  line-height: var(--go-line-height-compact);
  color: var(--go-text-primary);
  background: transparent;
  border: none;
  outline: none;
  caret-color: var(--go-magenta);
  resize: vertical;
  min-height: 80px;
}

.go-textarea__input::placeholder {
  color: transparent;
}

.go-textarea:focus-within .go-textarea__input::placeholder {
  color: var(--go-text-disabled);
  transition: color 0.2s ease 0.1s;
}

.go-textarea__label {
  position: absolute;
  top: var(--go-space-3);
  left: var(--go-space-3);
  font-family: var(--go-font-family);
  font-size: var(--go-font-size-body);
  color: var(--go-text-secondary);
  pointer-events: none;
  transform-origin: left top;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.go-textarea:focus-within > .go-textarea__label {
  top: 0;
  left: 6px;
  transform: translateY(-38%) scale(0.75);
  color: var(--go-magenta);
  padding: 0 var(--go-space-2);
}

.go-textarea--has-value > .go-textarea__label {
  top: 0;
  left: 6px;
  transform: translateY(-38%) scale(0.75);
  padding: 0 var(--go-space-2);
}

/* ==========================================================================
   GO! Rolpermissies
   ========================================================================== */

.rolpermissies-saved {
  background-color: #d4edda;
  transition: background-color 0.3s ease-in-out;
}

/* Matrix checkbox — compact GO! style for table cells (mirrors GoCheckbox visuals) */
.go-matrix-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  -webkit-user-select: none;
  user-select: none;
}

.go-matrix-checkbox__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.go-matrix-checkbox__box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--go-border-strong);
  border-radius: var(--go-radius-sm);
  background: transparent;
  color: transparent;
  transition: background-color 0.2s ease,
              border-color 0.2s ease;
}

.go-matrix-checkbox__icon {
  width: 12px;
  height: 10px;
}

.go-matrix-checkbox--checked .go-matrix-checkbox__box {
  background-color: var(--go-magenta);
  border-color: var(--go-magenta);
  color: #FFFFFF;
}

.go-matrix-checkbox:hover .go-matrix-checkbox__box {
  border-color: var(--go-magenta);
}

.go-matrix-checkbox--checked:hover .go-matrix-checkbox__box {
  background-color: var(--go-magenta-dark);
  border-color: var(--go-magenta-dark);
}

.go-matrix-checkbox__input:focus-visible ~ .go-matrix-checkbox__box {
  box-shadow: 0 0 0 3px rgba(var(--go-magenta-rgb), 0.2);
  border-color: var(--go-magenta);
}

.go-matrix-checkbox--disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   GO! Combobox
   ========================================================================== */

.go-combobox {
  position: relative;
  width: 100%;
}

.go-combobox__input-wrap {
  position: relative;
}

.go-combobox__input {
  padding-right: 36px;
}

.go-combobox__input:focus {
  border-color: var(--go-magenta);
  box-shadow: 0 0 0 2px rgba(229, 0, 125, 0.15);
}

.go-combobox__toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 34px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--go-text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 var(--go-radius-sm) var(--go-radius-sm) 0;
  transition: color 0.15s ease-in-out;
}

.go-combobox__toggle:hover {
  color: var(--go-text-dark);
}

.go-combobox__chevron {
  width: 16px;
  height: 12px;
  transition: transform 0.2s ease;
}

.go-combobox--open .go-combobox__chevron {
  transform: rotate(180deg);
}

.go-combobox__listbox {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 240px;
  overflow-y: auto;
  background: var(--go-background);
  border: 1px solid var(--go-border-strong);
  border-top: none;
  border-radius: 0 0 var(--go-radius-sm) var(--go-radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  list-style: none;
  padding: 0;
  margin: 0;
}

.go-combobox--open .go-combobox__listbox {
  display: block;
}

.go-combobox__item {
  padding: var(--go-space-2) var(--go-space-3);
  cursor: pointer;
  font-size: var(--go-font-size-body);
  color: var(--go-text-primary);
  transition: background-color 0.1s ease-in-out;
}

.go-combobox__item:hover,
.go-combobox__item--active {
  background-color: var(--go-surface-alt);
}

.go-combobox__item--disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.go-combobox__item--action {
  color: var(--go-magenta);
  font-weight: 500;
  border-bottom: 1px solid var(--go-border);
}

.go-combobox__item--action:hover,
.go-combobox__item--action.go-combobox__item--active {
  background-color: var(--go-magenta-bg, var(--go-surface-alt));
}

.go-combobox__item--empty {
  font-style: italic;
  color: var(--go-text-muted);
  cursor: default;
  pointer-events: none;
}

/* Werkruimte badge for overview tables in "Alle werkruimten" mode */
.go-ws-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: var(--go-font-size-caption);
    font-weight: 500;
    background: var(--go-surface-alt);
    border-radius: var(--go-radius-sm);
    color: var(--go-text-secondary);
}

/* Badge with integrated remove button */
.go-badge__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color 0.15s ease-in-out;
}

.go-badge__remove:hover {
  background: rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   Inhoud & Structuur Tab — SortableJS + Module Grouping
   ========================================================================== */

/* SortableJS drag feedback */
.sortable-ghost {
  opacity: 0.4;
  background: var(--go-turquoise-bg, #e8f7f5) !important;
}

.sortable-chosen {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Dim beschikbare-sessies zone when dragging a block (not a session item) */
body.block-dragging #beschikbare-sessies {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Drop zones between rows for solo block placement */
.blok-drop-zone {
  min-height: 4px;
  margin: 2px 0;
  border-radius: 4px;
  transition: min-height 0.15s, background-color 0.15s;
}

body.block-dragging .blok-drop-zone {
  min-height: 24px;
  background: var(--go-turquoise-bg, #e8f7f5);
  border: 2px dashed var(--go-border-strong, #adb5bd);
  transition: min-height 0.2s ease, background-color 0.2s ease;
}

/* Prevent text selection on draggable items within blok containers */
[id^="blok-"] > [data-id],
#beschikbare-sessies > [data-id] {
  user-select: none;
  -webkit-user-select: none;
}

/* Module group styling */
.inhoud-module-groep {
  border: 1px dashed var(--go-border-strong);
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

.inhoud-module-groep .module-header {
  padding: 0.75rem 1rem;
  background-color: var(--go-turquoise-bg);
  border-bottom: 1px solid var(--go-border);
  border-radius: 0.375rem 0.375rem 0 0;
  cursor: grab;
}

/* Inline edit icon buttons (confirm/cancel) */
.go-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--go-border-strong);
  border-radius: var(--go-radius-sm);
  background: transparent;
  color: var(--go-text-secondary);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.go-icon-btn:hover {
  background-color: var(--go-surface-alt);
  color: var(--go-text-dark);
}

.go-icon-btn--confirm {
  color: var(--go-success);
  border-color: var(--go-success);
}

.go-icon-btn--confirm:hover {
  background-color: var(--go-success);
  color: #fff;
}

.go-icon-btn--cancel:hover {
  background-color: var(--go-error);
  border-color: var(--go-error);
  color: #fff;
}

.inhoud-module-groep .module-header:active {
  cursor: grabbing;
}

.inhoud-module-groep .module-sessies {
  padding: 0.5rem;
  min-height: 48px;
}

/* Sessie card expand/collapse chevron */
.sessie-chevron {
  flex-shrink: 0;
  margin-right: 6px;
  color: var(--go-text-secondary);
  transition: transform 0.2s ease;
}

.sessie-chevron--open {
  transform: rotate(90deg);
}

/* Niet-toegewezen section */
.inhoud-niet-toegewezen {
  border: 1px dashed var(--go-border-strong);
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
  min-height: 48px;
}

.inhoud-niet-toegewezen--warning {
  background: #fff8e6;
  border-color: #ffe69c;
  border-style: solid;
}

/* Summary bar */
.inhoud-samenvatting {
  padding: 0.5rem 1rem;
  background: var(--bs-light);
  border-radius: var(--bs-border-radius);
  font-size: 0.875rem;
}

/* ==========================================================================
   Summary Cards (editie overzicht)
   ========================================================================== */

.go-summary-card {
  flex: 1 1 0;
  min-width: 120px;
  padding: var(--go-space-4) var(--go-space-5);
  background: var(--go-surface);
  border: 1px solid var(--go-border);
  border-radius: var(--go-radius-md, 0.5rem);
  text-align: center;
}

.go-summary-card__value {
  font-size: var(--go-font-size-h2, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--go-text-dark);
}

.go-summary-card__label {
  font-size: var(--go-font-size-sm, 0.875rem);
  color: var(--go-text-secondary);
  margin-top: var(--go-space-1, 0.25rem);
}

/* ==========================================================================
   Collapsible Sections (editie detail tabs)
   ========================================================================== */

.go-collapsible-section {
  border-bottom: 1px solid var(--go-border);
  margin-bottom: var(--go-space-3, 0.75rem);
}

.go-collapsible-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--go-space-3) 0;
  cursor: pointer;
  user-select: none;
}

.go-collapsible-section__header:hover {
  color: var(--go-teal);
}

.go-collapsible-section__title {
  font-weight: 600;
  font-size: var(--go-font-size-base, 1rem);
  color: var(--go-text-dark);
  margin: 0;
}

.go-collapsible-section__chevron {
  transition: transform 0.2s ease;
  color: var(--go-text-secondary);
}

.go-collapsible-section__chevron--open {
  transform: rotate(180deg);
}

.go-collapsible-section__body {
  padding: 0 0 var(--go-space-4);
}
