/* Shared base styling for public view templates. */

main {
  padding: 0px;
}

@media (max-width: 768px) {
  main {
    padding: 0px;
  }
}

body {
  font-family: sans-serif;
  background-color: #c3d4e3;
  color: #333;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0px;
}

h1, h2, h3 {
  display: block;
  color: #1d87f8;
}

#output {
  resize: none;
  overflow: hidden;
  min-height: 100px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
}

#email_output {
  resize: none;
  overflow: hidden;
  height: auto;
  min-height: 100px;
  box-sizing: border-box;
}

body.dark-mode {
  background-color: #181a1b;
  color: #e0e0e0;
}

.json-output-wrapper {
  flex: 1;
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  max-height: 1200px;
  font-family: monospace;
  font-size: 0.85rem;
  color: #222;
}

body.dark-mode .json-output-wrapper {
  background: #111;
  color: #0f0;
}

a {
  color: #0056b3;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

body.dark-mode a {
  color: #80bfff;
}

.hidden {
  display: none !important;
}

.hide-on-abgelehnt.hidden {
  display: none !important;
}

.modus-verlaengerung {
  background: #388e3c;
}

.modus-ablehnung {
  background: #c62828;
}

.modus-deaktivierung {
  background: #ef6c00;
}

.modus-speichern {
  background: #388e3c;
}

@media (max-width: 768px) {
  body {
    font-size: 1.1rem;
  }

}
/* Reusable components (nav, buttons, modals, helpers) extracted from legacy style.css */

.main-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.header-bar button {
  margin: 0;
}

.header-bar h1 {
  margin: 0;
  font-size: 2rem;
}

.footer-note {
  font-size: 0.85rem;
  color: rgba(60, 60, 60, 0.65);
  text-align: center;
  margin-top: 2rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.footer-note hr {
  margin-top: 3rem;
  margin-bottom: 1rem;
  border: none;
  border-top: 1px solid #ccc;
}

body.dark-mode .footer-note {
  color: rgba(220, 220, 220, 0.55);
}

body.dark-mode .footer-note hr {
  border-top-color: #444;
}

#befristung_begruendung label {
  display: block;
  margin-bottom: -0.2rem;
}

form label {
  display: block;
  margin-top: 1rem;
  font-weight: 500;
}

input[type="date"], input[type="time"], input[type="text"], input[type="password"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  max-width: 750px;
  padding: 0.6rem;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

textarea {
  resize: vertical;
}

button:not(.left-panel-toggle):not(.right-panel-toggle):not(.map-button):not(.map-left-toggle):not(.airspace-filter-add-btn):not(.tra-nav__button), a.button-link {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: #1d87f8;
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:not(.left-panel-toggle):not(.right-panel-toggle):not(.map-button):not(.map-left-toggle):not(.airspace-filter-add-btn):not(.tra-nav__button):hover, a.button-link:hover {
  background: #0056b3;
}

.disabled-button {
  background-color: grey !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

section {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  /* border-radius: 10px; */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  padding: 1.5em 2em;
  /* margin: 2em auto; */
  margin-top: 10px;
  max-width: 800px;
  color: #222;
}

body.dark-mode section {
  background: #23272e;
  border: 1px solid #444;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  background-color: #1e1e1e;
  color: #e0e0e0;
}

body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
  background-color: #2c2c2c;
  color: #e0e0e0;
  border: 1px solid #555;
}

body.dark-mode button:not(.left-panel-toggle):not(.right-panel-toggle):not(.map-button):not(.map-left-toggle):not(.airspace-filter-add-btn):not(.tra-nav__button), body.dark-mode a.button-link {
  background-color: #444;
  color: #fff;
}

body.dark-mode button:not(.left-panel-toggle):not(.right-panel-toggle):not(.map-button):not(.map-left-toggle):not(.airspace-filter-add-btn):not(.tra-nav__button):hover, body.dark-mode a.button-link:hover {
  background-color: #666;
}

.button-link {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background-color: #1d87f8;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.95rem;
  margin-left: 0.5rem;
  transition: background 0.2s ease;
}

.button-link:hover {
  background-color: #0056b3;
}

body.dark-mode .button-link {
  background-color: #555;
  color: #fff;
}

.form-hint {
  font-size: 0.85em;
  color: #666;
  margin-top: 4px;
  margin-bottom: 10px;
}

.form-hint-with-icon {
  font-size: 0.85em;
  color: #666;
  margin-left: 1.8em;
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
  margin-top: 4px;
  margin-bottom: 10px;
}

.hint-icon {
  flex-shrink: 0;
  font-size: 1em;
  margin-top: 2px;
}

.hint-text {
  line-height: 1.3;
}

.full-width-button-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.full-width-button-group button {
  width: 100%;
  max-width: 450px;
}

nav {
  background: #e3f0ff;
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 2px solid #b6d4fe;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: #fff;
  min-width: 180px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  border-radius: 4px;
  border: 1px solid #ccc;
  margin-top: 2px;
}

.nav-dropdown-content a {
  color: #1d87f8;
  padding: 10px 16px;
  text-decoration: none;
  display: block;
  border-radius: 0;
  background: none;
  transition: background 0.2s, color 0.2s;
}

.nav-dropdown-content a:hover {
  background: #e9ecef;
  color: #0056b3;
}

body.dark-mode nav {
  /* background: #333;
  border-bottom: 2px solid #222; */
}

.nav-spacer {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-dropdown {
  display: inline-block;
  position: relative;
}

body.dark-mode .nav-dropdown-content {
  background: #23272e;
  color: #eee;
  border: 1px solid #555;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
}

body.dark-mode .nav-dropdown-content a {
  color: #7abaff;
  background: none;
}

body.dark-mode .nav-dropdown-content a:hover {
  background: #333;
  color: #fff;
}

.nav-prod {
  background: #e3f0ff !important;
  border-bottom: 2px solid #b6d4fe !important;
}

.nav-staging {
  background: #ffe3e3 !important;
  border-bottom: 2px solid #ffb6b6 !important;
}

body.dark-mode .nav-prod {
  background: #222f3a !important;
  border-bottom: 2px solid #1976d2 !important;
}

body.dark-mode .nav-staging {
  background: #3a2323 !important;
  border-bottom: 2px solid #a71d2a !important;
}

.icon-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1em;
  vertical-align: middle;
}

.icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

dialog, dialog form {
  background: #fff;
  color: #222;
  border-radius: 8px;
}

body.dark-mode dialog, body.dark-mode dialog form {
  background: #23272e;
  color: #eee;
}

dialog input, dialog select, dialog textarea, dialog button {
  background: #fff;
  color: #222;
  border: 1px solid #bbb;
}

body.dark-mode dialog input, body.dark-mode dialog select, body.dark-mode dialog textarea, body.dark-mode dialog button {
  background: #23272e;
  color: #eee;
  border: 1px solid #444;
}

.footer-note a {
  color: rgba(0, 123, 255, 0.75);
  text-decoration: underline dotted;
  transition: color 0.2s;
}

.footer-note a:hover {
  color: rgba(0, 86, 179, 0.95);
}

body.dark-mode .footer-note a {
  color: rgba(100, 180, 255, 0.7);
}

body.dark-mode .footer-note a:hover {
  color: rgba(100, 180, 255, 1);
}

body.dark-mode .message {
  color: #7fff7f;
}

.form-section {
  margin-bottom: 2rem;
  background: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  max-width: 800px;
  border: 2px solid #e0e0e0;
  transition: border-color 0.2s, background 0.2s;
}

.form-section.vereinsdaten {
  border-color: #1976d2;
  background: #f5faff;
}

.form-section.messenger {
  border-color: #43a047;
  background: #f7fff8;
}

.form-section.mail {
  border-color: #ffa000;
  background: #fffbe7;
}

.form-section.tras {
  border-color: #d32f2f;
  background: #fff5f5;
}

body.dark-mode .form-section {
  background: #23272e;
  color: #e0e0e0;
  border-color: #444;
}

body.dark-mode .form-section.vereinsdaten {
  border-color: #1976d2;
  background: #1a2233;
}

body.dark-mode .form-section.messenger {
  border-color: #43a047;
  background: #1e2a1e;
}

body.dark-mode .form-section.mail {
  border-color: #ffa000;
  background: #2a241a;
}

body.dark-mode .form-section.tras {
  border-color: #d32f2f;
  background: #2a1a1a;
}

.switch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  user-select: none;
}

.mode-label {
  color: #fff;
}

.switch-slider {
  position: relative;
  width: 60px;
  height: 30px;
  background-color: #888;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.switch-slider i {
  position: absolute;
  top: 50%;
  transform: translatey(-50%);
  color: white;
  font-size: 14px;
  z-index: 1;
}

.sun-icon {
  left: 8px;
}

.moon-icon {
  right: 8px;
}

.switch-handle {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 24px;
  height: 24px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
  z-index: 2;
}

#darkmode-toggle:checked + .switch-slider {
  background-color: #34495e;
}

#darkmode-toggle:checked + .switch-slider .switch-handle {
  transform: translatex(30px);
}

body:not(.dark-mode) .mode-label {
  color: #333;
}

body.dark-mode .mode-label {
  color: #fff;
}

.error-404-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  margin: 3em 0;
}

.error-404-title {
  font-size: 5em;
  font-weight: bold;
  color: #c00;
  margin-bottom: 0.2em;
}

.error-404-text {
  font-size: 2em;
  color: #444;
}

@media (min-width: 1000px) {
  .main-wrapper {
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: 1600px;
  }

}

@media (max-width: 768px) {
  input[type="date"], input[type="time"], input[type="text"], input[type="email"], input[type="tel"], select, textarea {
    font-size: 1.1rem;
    padding: 0.8rem;
  }

  label {
    font-size: 1.05rem;
  }

  .textarea-whatsapp, .textarea-mail, textarea {
    width: 100%;
  }

  button:not(.left-panel-toggle):not(.right-panel-toggle):not(.map-button):not(.map-left-toggle):not(.airspace-filter-add-btn), a.button-link {
    font-size: 1.1rem;
    padding: 0.8rem 1.2rem;
  }

}


.statistic-summary-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  margin: 2em 0 2.5em 0;
}

.tra-einzelaktion-block {
  margin-bottom: 1em;
  padding: 0.7em 1em;
  border-radius: 7px;
  background: #f8fafd;
  color: #222;
}

.tra-einzelaktion-block input[type="time"] {
  width: 180px !important;
  min-width: 120px;
  font-size: 1.1em;
}

.aup-archive-center-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.aup-archive-title {
  text-align: center;
  color: #398ce6;
  margin-bottom: 1.5rem;
}

.aup-archive-list {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 700px;
  margin-top: 1em;
  border-radius: 6px;
  background: #c3d4e3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

body.dark-mode .aup-archive-list {
  background: #181a1b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.aktive-tras-box {
  background: #f9f9f9;
  color: #222;
  border-radius: 10px;
  padding: 1.5em 2em;
  margin: 2em auto;
  max-width: 500px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.aktive-tras-box h2 {
  margin-top: 0;
  color: #1d87f8;
}

.aktive-tras-box ul {
  margin: 0.5em 0 0 1em;
  padding: 0;
}

.aktive-tras-box li {
  margin-bottom: 0.5em;
}

body.dark-mode .aktive-tras-box {
  background: #23272e;
  color: #f1f1f1;
}

body.dark-mode .aktive-tras-box h2 {
  color: #4dabff;
}

.view-routing {
  width: 100%;
}

.atis-archive-title {
  margin-bottom: 1.2em;
  margin-left: auto;
  margin-right: auto;
  max-width: 1100px;
  padding-left: 0.5em;
}

.atis-archive-filter-btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  min-width: 90px;
  height: 2.5em;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  align-self: flex-end;
  margin-bottom: 0;
  text-align: center;
  box-sizing: border-box;
  line-height: 1.1em;
  transition: background 0.2s, color 0.2s;
  background: #1d87f8;
  color: #fff;
}

.atis-archive-filter-btn:hover, .atis-archive-filter-btn:focus {
  background: #0056b3;
}

.atis-archive-reset-btn {
  margin-left: 0.2em;
  align-self: flex-end;
  min-width: 90px;
  height: 2.5em;
  line-height: 1.1em;
  text-align: center;
  box-sizing: border-box;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
}

.reason-popup {
  position: fixed;
  z-index: 9999;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 260px;
  max-width: 90vw;
  max-height: 60vh;
  background: #fff;
  color: #222;
  border: 1px solid #b3c6e0;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  padding: 1.2em 2em 2em 2em;
  font-size: 1.05em;
  line-height: 1.5;
  transition: background 0.2s, color 0.2s, border 0.2s;
  pointer-events: auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reason-popup .popup-close {
  margin-top: 1.5em;
  background: #e3e3e3;
  border: none;
  color: #333;
  font-size: 1em;
  border-radius: 6px;
  padding: 0.5em 1.5em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.reason-popup .popup-close:hover {
  background: #1d87f8;
  color: #fff;
}

body.dark-mode .reason-popup {
  background: #23272e;
  color: #eee;
  border: 1px solid #444;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

body.dark-mode .reason-popup .popup-close {
  background: #444;
  color: #eee;
}

body.dark-mode .reason-popup .popup-close:hover {
  background: #7abaff;
  color: #222;
}

.aup-toggle-btn .fa-chevron-up, .aup-toggle-btn.open .fa-chevron-down {
  display: none;
}

.aup-toggle-btn.open .fa-chevron-up {
  display: inline;
}

.aup-toggle-btn .fa-chevron-down {
  display: inline;
}

.aup-toggle-btn.open .fa-chevron-down {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .tra-einzelaktion-block {
    background: #232a33;
    color: #e6e6e6;
  }

  .tra-einzelaktion-block label, .tra-einzelaktion-block span {
    color: #e6e6e6;
  }

}
