/* =========================================================
   PAHO Polls Terminplaner
   Neu aufgebaut nach Optik von start.html
   ========================================================= */

/* Basis */
html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  background: #08111d !important;
  color: #edf2f6;
  overflow-x: hidden;
  font-family: Inter, Roboto, Lato, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:root {
  --orange: #ff821c;
  --green: #58d66b;
  --yellow: #ffd166;
  --red: #ff6b6b;
  --dark: #08111d;
  --text: #edf2f6;
  --soft-text: rgba(237, 242, 246, .76);
  --muted: rgba(237, 242, 246, .64);
}

/* Hauptfläche */
.paho-scheduler {
  min-height: 100vh;
  padding: 34px 18px;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 130, 28, .30), transparent 26%),
    radial-gradient(circle at 85% 80%, rgba(88, 214, 107, .34), transparent 30%),
    linear-gradient(120deg, #08111d, #111923 48%, #13372f);
}

/* Innenkarte wie start.html, nur breiter für den Terminplaner */
.scheduler-card {
  width: min(980px, 100%);
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 48px);
  padding-bottom: 20px;
  border-radius: 34px;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, .15),
      rgba(255, 255, 255, .055)
    );
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, .46),
    inset 0 1px 0 rgba(255, 255, 255, .14);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}

/* Header */
.scheduler-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(34px, 6vw, 76px);
  margin-bottom: clamp(34px, 5vw, 58px);
}

.scheduler-header-text {
  min-width: 0;
  flex: 1 1 auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 19px;
  margin-bottom: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .115);
  border: 1px solid rgba(255, 255, 255, .18);
  color: rgba(237, 242, 246, .82);
  font-size: .78rem;
  line-height: 1.45;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.status-pill span {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(88, 214, 107, .85);
}

.scheduler-header h1 {
  margin: 0 0 24px;
  color: var(--text);
  font-size: clamp(3rem, 8vw, 6.2rem);
  line-height: .92;
  letter-spacing: -.055em;
  font-weight: 900;
}

.scheduler-header h1 span {
  background: linear-gradient(90deg, var(--orange), #ffc65c, var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.scheduler-header p {
  width: min(900px, 100%);
  max-width: 900px;
  margin: 0;
  color: rgba(237, 242, 246, .64);
  font-size: clamp(.98rem, 1.25vw, 1.04rem);
  line-height: 1.65;
  font-weight: 300;
  letter-spacing: -0.01em;
}

.logo-home-link {
  display: block;
  flex: 0 0 auto;
  max-width: 360px;
  line-height: 0;
  text-decoration: none;
}

.logo-home-link:hover,
.logo-home-link:focus {
  transform: none;
  filter: none;
}

.scheduler-logo {
  display: block;
  width: clamp(220px, 23vw, 360px);
  max-width: 100%;
  height: auto !important;
  margin: 0;
  object-fit: contain;
  filter:
    drop-shadow(0 14px 34px rgba(255, 130, 28, .22))
    drop-shadow(0 14px 34px rgba(88, 214, 107, .22));
}

/* Panels und Boxen */
.scheduler-panel {
  padding: clamp(24px, 4vw, 42px);
  border-radius: 28px;
  background:
    linear-gradient(
      135deg,
      rgba(8, 17, 29, .62),
      rgba(8, 17, 29, .42)
    );
  border: 1px solid rgba(255, 255, 255, .145);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 22px 58px rgba(0, 0, 0, .22);
}

.glass-box,
.view-head,
.form-grid,
.selected-box,
.created-link-box,
.share-box,
.name-row,
.vote-table-wrap,
.results,
.custom-picker {
  border-radius: 24px;
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 18px 42px rgba(0, 0, 0, .18);
}

.view-head,
.form-grid,
.selected-box,
.created-link-box,
.share-box,
.name-row,
.results {
  padding: clamp(18px, 2.4vw, 28px);
  margin-bottom: 24px;
}

.view-head h2,
.selected-box h2,
.created-link-box h2,
.results h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  line-height: 1.32;
  font-weight: 800;
  letter-spacing: -.02em;
}

.view-head p,
.created-link-box p,
.selected-appointments,
.empty-state {
  margin: 0;
  color: rgba(237, 242, 246, .64);
  line-height: 1.55;
  font-weight: 300;
}

/* Formular */
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, .75fr);
  gap: 18px;
}

.form-grid label,
.custom-picker label {
  display: grid;
  gap: 9px;
}

.form-grid label span,
.custom-picker label span,
.share-box > span {
  color: rgba(237, 242, 246, .72);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.paho-scheduler input[type="text"],
.paho-scheduler input[type="date"],
.paho-scheduler select,
.paho-scheduler .share-row input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .20);
  background: rgba(255, 255, 255, .10);
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 14px 28px rgba(0, 0, 0, .10);
}

.paho-scheduler input::placeholder {
  color: rgba(237, 242, 246, .48);
}

.paho-scheduler input:focus,
.paho-scheduler select:focus {
  border-color: rgba(88, 214, 107, .58);
  background: rgba(255, 255, 255, .135);
  box-shadow:
    0 0 0 4px rgba(88, 214, 107, .12),
    inset 0 1px 0 rgba(255, 255, 255, .14);
}

.paho-scheduler select option {
  color: #08111d;
}

/* Buttons */
.scheduler-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 26px;
}

.paho-scheduler button,
.paho-scheduler .gradient-button,
.paho-scheduler .save-button,
.paho-scheduler .open-poll-link,
.paho-scheduler .footer-contact a {
  min-height: 56px;
  padding: 0 30px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--green));
  color: #08111d !important;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 14px 36px rgba(255, 130, 28, .20),
    0 14px 36px rgba(88, 214, 107, .15);
  transition:
    transform .2s ease,
    filter .2s ease,
    box-shadow .2s ease;
}

.paho-scheduler button:hover,
.paho-scheduler .gradient-button:hover,
.paho-scheduler .save-button:hover,
.paho-scheduler .open-poll-link:hover,
.paho-scheduler .footer-contact a:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.paho-scheduler button:focus-visible,
.paho-scheduler .gradient-button:focus-visible,
.paho-scheduler .save-button:focus-visible,
.paho-scheduler .open-poll-link:focus-visible,
.paho-scheduler .footer-contact a:focus-visible {
  outline: 3px solid rgba(88, 214, 107, .55);
  outline-offset: 4px;
}

.paho-scheduler button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

/* Custom Picker */
.custom-picker {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr) minmax(0, .7fr) auto;
  gap: 16px;
  align-items: end;
  padding: clamp(18px, 2.4vw, 24px);
  margin: 0 0 26px;
}

.selected-appointments {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 1rem;
}

.appointment-chip {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 130, 28, .88), rgba(88, 214, 107, .88));
  color: #08111d;
  font-weight: 800;
}

.appointment-chip button {
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 50%;
  background: rgba(8, 17, 29, .18);
  box-shadow: none;
}

.save-button {
  width: 100%;
  display: flex;
  margin: 26px 0 46px;
}

.share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.open-poll-link {
  margin-top: 14px;
}

/* Tabellen */
.vote-table-wrap,
.responses-table-wrap,
#responsesTable {
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.vote-table,
.responses-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}

.vote-table th,
.vote-table td,
.responses-table th,
.responses-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .055);
  color: rgba(237, 242, 246, .76);
  text-align: left;
  line-height: 1.55;
  vertical-align: middle;
}

.vote-table th,
.responses-table th {
  color: var(--text);
  font-weight: 800;
  background: rgba(255, 255, 255, .09);
}

.vote-table th:not(:first-child),
.vote-table td:not(:first-child) {
  text-align: center;
}

/* Voting */
.vote-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vote-option input {
  position: absolute;
  opacity: 0;
}

.vote-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .26);
  background: rgba(255, 255, 255, .10);
  color: #fff;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 900;
}

.vote-option input:checked + span.yes {
  background: var(--green);
  color: #08111d;
}

.vote-option input:checked + span.maybe {
  background: var(--yellow);
  color: #08111d;
}

.vote-option input:checked + span.no {
  background: var(--red);
  color: #08111d;
}

/* Resultate */
.results {
  margin-top: 0;
}

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 42px;
  margin-bottom: 24px;
}

.results-head h2 {
  margin-bottom: 0;
}

.results-head button,
.results-head .gradient-button {
  flex: 0 0 auto;
  margin-left: auto;
}

.best-slots {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.best-slot {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(88, 214, 107, .13);
  border: 1px solid rgba(88, 214, 107, .26);
  color: rgba(237, 242, 246, .76);
  font-weight: 500;
}

.vote-yes {
  color: var(--green);
  font-weight: 800;
}

.vote-maybe {
  color: var(--yellow);
  font-weight: 800;
}

.vote-no {
  color: var(--red);
  font-weight: 800;
}

/* Meldungen */
.message-box {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
}

.message-box.is-success {
  display: block;
  background: rgba(88, 214, 107, .18);
  color: #baf8c4;
  border: 1px solid rgba(88, 214, 107, .32);
}

.message-box.is-error {
  display: block;
  background: rgba(255, 90, 90, .16);
  color: #ffd0d0;
  border: 1px solid rgba(255, 90, 90, .32);
}

/* Footer - an start.html angeglichen */
.scheduler-footer {
  margin-top: auto;
  padding-top: 34px;
  color: rgba(237, 242, 246, .65);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-contact {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 0;
  color: rgba(237, 242, 246, .68);
  font-size: .9rem;
  line-height: 1.5;
  font-weight: 400;
}

.footer-contact span {
  color: rgba(237, 242, 246, .68);
  font-size: .9rem;
  line-height: 1.5;
  font-weight: 400;
}

.footer-contact a {
  min-height: 44px !important;
  padding: 0 20px !important;
  font-size: .9rem !important;
}

.footer-legal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  margin-bottom: 0;
  color: rgba(237, 242, 246, .68);
  font-size: 8px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.footer-legal-links a,
.footer-legal-links a:link,
.footer-legal-links a:visited,
.footer-legal-links a:active {
  min-height: auto !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  display: inline !important;
  color: rgba(237, 242, 246, .68) !important;
  font-size: 9px !important;
  line-height: 1.4 !important;
  font-weight: 100 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
}

.footer-legal-links a:hover,
.footer-legal-links a:focus {
  color: var(--green) !important;
  text-decoration: underline !important;
  transform: none !important;
  filter: none !important;
}

.footer-copyright {
  margin-top: 18px;
  margin-bottom: 0;
  color: rgba(237, 242, 246, .65);
  font-size: .82rem;
  line-height: 1.5;
  font-weight: 300;
  text-align: center;
}

.footer-copyright a,
.footer-copyright a:link,
.footer-copyright a:visited,
.footer-copyright a:active {
  min-height: auto !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  display: inline !important;
  color: #ffb347 !important;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.footer-copyright a:hover,
.footer-copyright a:focus {
  color: var(--green) !important;
  text-decoration: underline !important;
  transform: none !important;
  filter: none !important;
}

/* Rechtliche Seiten */
.legal-page {
  max-width: 920px;
  margin: 0 auto;
}

.legal-content {
  display: grid;
  gap: 22px;
}

.legal-content section {
  padding: clamp(18px, 2.4vw, 28px);
}

.legal-content h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.35;
  font-weight: 850;
  letter-spacing: -.015em;
}

.legal-content p,
.legal-content li {
  color: rgba(237, 242, 246, .64);
  font-size: .98rem;
  line-height: 1.65;
  font-weight: 300;
}

.legal-content p {
  margin: 0 0 10px;
}

.legal-content ul {
  margin: 0;
  padding-left: 20px;
}

.legal-content a,
.legal-content a:link,
.legal-content a:visited,
.legal-content a:active {
  color: #ffb347;
  text-decoration: none;
  font-weight: 700;
}

.legal-content a:hover,
.legal-content a:focus {
  color: var(--green);
  text-decoration: underline;
}

.legal-meta {
  color: rgba(237, 242, 246, .48);
  font-size: .85rem;
  line-height: 1.55;
}

.legal-back {
  margin-top: 26px;
}

.legal-back a {
  width: auto;
}

/* Tablet */
@media (max-width: 1000px) {
  .scheduler-header {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 34px;
  }

  .scheduler-header .logo-home-link {
    width: min(300px, 42vw);
    max-width: 300px;
    margin: 0 auto;
    align-self: center;
  }

  .scheduler-header .scheduler-logo {
    width: 100%;
    max-width: 100%;
    height: auto !important;
    margin: 0;
    object-fit: contain;
  }

  .form-grid,
  .share-row,
  .custom-picker {
    grid-template-columns: 1fr;
  }

  .scheduler-controls button,
  .custom-picker button {
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 620px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .paho-scheduler {
    width: 100%;
    max-width: 100%;
    padding: 18px 10px;
    overflow-x: hidden;
  }

  .scheduler-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: calc(100vh - 36px);
    border-radius: 26px;
    padding: 30px 20px 20px;
    overflow: hidden;
  }

  .scheduler-header {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    gap: 28px;
  }

  .scheduler-header .logo-home-link {
    width: min(220px, 58vw);
    max-width: 220px;
    margin: 0 auto 28px;
    align-self: center;
  }

  .scheduler-header .scheduler-logo {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    margin: 0;
    object-fit: contain;
  }

  .status-pill {
    max-width: 100%;
    padding: 10px 14px;
    font-size: .66rem;
    line-height: 1.35;
    white-space: normal;
    text-align: center;
    justify-content: center;
  }

  .scheduler-header h1 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(2.5rem, 12vw, 3.8rem);
    line-height: .98;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
  }

  .scheduler-header p {
    width: 100%;
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  .scheduler-panel {
    width: 100%;
    max-width: 100%;
    padding: 22px;
    overflow: hidden;
  }

  .vote-table,
  .responses-table {
    min-width: 620px;
  }

  .vote-table th,
  .vote-table td,
  .responses-table th,
  .responses-table td {
    padding: 13px 14px;
    font-size: .92rem;
    white-space: nowrap;
  }

  .results-head {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .results-head button,
  .results-head .gradient-button {
    width: 100%;
    margin-left: 0;
  }

  .footer-contact {
    flex-direction: column;
    gap: 12px;
    font-size: .85rem;
  }

  .footer-contact span {
    font-size: .85rem;
  }

  .footer-contact a {
    min-height: 42px !important;
    padding: 0 18px !important;
    font-size: .85rem !important;
  }

  .footer-legal-links {
    margin-top: 18px;
    font-size: 8px;
    gap: 6px;
  }

  .footer-legal-links a,
  .footer-legal-links a:link,
  .footer-legal-links a:visited,
  .footer-legal-links a:active {
    font-size: 9px !important;
  }

  .footer-copyright {
    margin-top: 18px;
    font-size: .8rem;
    font-weight: 300;
  }
}

/* Legal header logo fix */
.legal-page .scheduler-header {
  gap: clamp(24px, 4vw, 48px);
  overflow: visible;
}

.legal-page .logo-home-link {
  flex: 0 0 auto;
  max-width: 220px;
  margin-right: 0;
  justify-content: flex-end;
}

.legal-page .scheduler-logo {
  width: clamp(160px, 16vw, 220px);
  max-width: 100%;
  height: auto !important;
  margin: 0;
  object-fit: contain;
}

@media (max-width: 1000px) {
  .legal-page .logo-home-link {
    width: min(220px, 42vw);
    max-width: 220px;
    margin: 0 auto;
    align-self: center;
  }
}

@media (max-width: 620px) {
  .legal-page .logo-home-link {
    width: min(180px, 50vw);
    max-width: 180px;
    margin: 0 auto 24px;
  }

  .legal-page .scheduler-header h1 {
    font-size: clamp(2.7rem, 13vw, 4rem);
    line-height: 1.06;
  }
}
