.gwf2-location-host {
  width: 100%;
  min-width: 0;
}

.gwf2-group-locations {
  display: grid;
  gap: 1rem;
  width: 100%;
  min-width: 0;
  color: var(--spu-text, #193247);
}

.gwf2-location-header,
.gwf2-location-content,
.gwf2-location-card,
.gwf2-location-summary,
.gwf2-location-help {
  min-width: 0;
  border: 1px solid var(--spu-border, #bdd3df);
  border-radius: 0.9rem;
  background: var(--spu-surface, #fff);
}

.gwf2-location-header,
.gwf2-location-content,
.gwf2-location-card,
.gwf2-location-help {
  padding: 1rem;
}

.gwf2-location-header h2,
.gwf2-location-card h3,
.gwf2-location-help h3 {
  margin-top: 0;
}

.gwf2-location-help {
  overflow: hidden;
  background: var(--spu-surface-soft, #f2f7f9);
}

.gwf2-location-help > summary {
  min-height: 2.6rem;
  cursor: pointer;
  font-weight: 700;
  line-height: 2.6rem;
}

.gwf2-location-help-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  gap: 0.85rem;
  padding-top: 0.8rem;
}

.gwf2-location-help-body > p {
  grid-column: 1 / -1;
  margin: 0;
}

.gwf2-location-help-step,
.gwf2-location-help-example {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--spu-border, #bdd3df);
  border-radius: 0.7rem;
  background: var(--spu-surface, #fff);
}

.gwf2-location-help-step h3,
.gwf2-location-help-example h3 {
  margin-bottom: 0.45rem;
  font-size: 1rem;
}

.gwf2-location-help-step p,
.gwf2-location-help-example p {
  margin: 0;
  overflow-wrap: anywhere;
}

.gwf2-location-help-step ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.gwf2-location-help-example {
  grid-column: 1 / -1;
  border-color: var(--spu-accent, #197b99);
}

.gwf2-location-toolbar,
.gwf2-location-tabs,
.gwf2-location-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.gwf2-location-toolbar {
  margin-top: 0.8rem;
}

.gwf2-location-tabs {
  overflow-x: auto;
  padding: 0.25rem 0 0.65rem;
  border-bottom: 1px solid var(--spu-border, #bdd3df);
}

.gwf2-location-button {
  min-height: 2.6rem;
  max-width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--spu-border, #bdd3df);
  border-radius: 0.65rem;
  background: var(--spu-surface-soft, #f2f7f9);
  color: var(--spu-text, #193247);
  font: inherit;
  font-weight: 650;
  line-height: 1.25;
  cursor: pointer;
}

.gwf2-location-button:hover:not(:disabled),
.gwf2-location-button.is-active {
  border-color: var(--spu-accent, #197b99);
  background: var(--spu-accent, #197b99);
  color: var(--spu-accent-contrast, #fff);
}

.gwf2-location-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.gwf2-location-source-note {
  display: block;
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
  color: var(--spu-muted, #61798a);
  font-size: 0.88em;
}

.gwf2-location-button.gwf2-location-primary {
  border-color: var(--spu-accent, #197b99);
  background: var(--spu-accent, #197b99);
  color: var(--spu-accent-contrast, #fff);
}

.gwf2-location-summary {
  margin-bottom: 0.8rem;
  padding: 0.8rem 1rem;
  background: var(--spu-surface-soft, #f2f7f9);
  font-weight: 700;
}

.gwf2-location-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.gwf2-location-calendar-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  align-items: end;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.gwf2-location-notifications,
.gwf2-location-import-preview {
  min-width: 0;
  margin: 0 0 0.85rem;
  padding: 0.75rem;
  border: 1px solid var(--spu-border, #bdd3df);
  border-radius: 0.7rem;
  background: var(--spu-surface-soft, #f2f7f9);
}

.gwf2-location-notifications h3 {
  margin: 0 0 0.5rem;
}

.gwf2-location-import-preview p {
  margin: 0.25rem 0;
}

.gwf2-location-field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  font-weight: 650;
}

.gwf2-location-field input,
.gwf2-location-field textarea,
.gwf2-location-field select,
.gwf2-group-locations input,
.gwf2-group-locations textarea,
.gwf2-group-locations select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--spu-border, #bdd3df);
  border-radius: 0.55rem;
  background: var(--spu-input, #fff);
  color: var(--spu-text, #193247);
  font: inherit;
}

.gwf2-location-field textarea,
.gwf2-group-locations textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.gwf2-location-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.gwf2-location-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}

.gwf2-location-table th,
.gwf2-location-table td {
  padding: 0.65rem 0.55rem;
  border-bottom: 1px solid var(--spu-border, #bdd3df);
  text-align: left;
  vertical-align: top;
}

.gwf2-location-table th {
  white-space: nowrap;
}

.gwf2-location-table td:last-child {
  min-width: 9rem;
}

.gwf2-location-card {
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.gwf2-location-card a[href$='/calendar'] {
  overflow-wrap: anywhere;
}

.gwf2-location-checklist {
  display: grid;
  gap: 0.45rem;
  max-height: 22rem;
  overflow: auto;
  padding: 0.7rem;
  border: 1px solid var(--spu-border, #bdd3df);
  border-radius: 0.7rem;
}

.gwf2-location-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.gwf2-location-check input {
  width: auto;
  min-height: auto;
  margin-top: 0.25rem;
}

.gwf2-location-note,
.gwf2-location-empty,
.gwf2-location-muted,
.gwf2-location-status {
  margin: 0.5rem 0;
  color: var(--spu-muted, #60798b);
}

.gwf2-location-status.is-error,
.gwf2-location-error {
  color: var(--spu-danger, #a93232);
}

.gwf2-location-options {
  display: grid;
  gap: 0.6rem;
}

.gwf2-location-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.7rem;
  border: 1px solid var(--spu-border, #bdd3df);
  border-radius: 0.7rem;
}

.gwf2-location-grant-rights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
}

.gwf2-location-grant-rights label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.gwf2-location-grant-rights input {
  width: auto;
  min-height: auto;
}

html[data-theme-mode='dark'] .gwf2-location-header,
html[data-theme-mode='dark'] .gwf2-location-content,
html[data-theme-mode='dark'] .gwf2-location-card,
html[data-theme-mode='dark'] .gwf2-location-summary {
  background: var(--spu-surface, #18232c);
}

@media (max-width: 700px) {
  .gwf2-location-header,
  .gwf2-location-content,
  .gwf2-location-card {
    padding: 0.75rem;
  }

  .gwf2-location-toolbar > *,
  .gwf2-location-actions > * {
    flex: 1 1 10rem;
  }

  .gwf2-location-table {
    min-width: 42rem;
  }
}

@media print {
  body * {
    visibility: hidden !important;
  }

  .gwf2-location-host,
  .gwf2-location-host * {
    visibility: visible !important;
  }

  .gwf2-location-host {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    color: #111 !important;
    background: #fff !important;
  }

  .gwf2-location-header,
  .gwf2-location-tabs,
  .gwf2-location-toolbar,
  .gwf2-location-calendar-filters,
  .gwf2-location-help,
  .gwf2-location-notifications,
  .gwf2-location-status,
  .gwf2-location-muted,
  .gwf2-location-calendar-content .gwf2-location-button,
  .gwf2-location-calendar-content th:last-child,
  .gwf2-location-calendar-content td:last-child {
    display: none !important;
  }

  .gwf2-location-content,
  .gwf2-location-table-wrap {
    overflow: visible !important;
    border: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .gwf2-location-calendar-content::before {
    display: block;
    margin-bottom: 0.8rem;
    color: #111;
    font-size: 18pt;
    font-weight: 700;
    content: "Orte & Belegung · Kalender";
  }

  .gwf2-location-table {
    width: 100%;
    color: #111 !important;
    font-size: 9pt !important;
  }

  .gwf2-location-table th,
  .gwf2-location-table td {
    border-color: #777 !important;
  }
}
