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

html, body {
  margin: 0;
  min-height: 100%;
  background: #101010;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

button, input, select { font: inherit; }

.app {
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  background: #171717;
}

.view { display: none; min-height: 100vh; }
.view.active { display: block; }

.site-header {
  text-align: center;
  padding: 28px 24px 48px;
}

.logo {
  display: block;
  width: 130px;
  height: 130px;
  object-fit: contain;
  margin: 0 auto 20px;
}

.site-header h1 {
  margin: 0;
  color: #fff;
  font-size: 2.05rem;
  line-height: 1.1;
  font-weight: 800;
}

.site-header h2 {
  margin: 18px 0 0;
  color: #d9b63c;
  font-size: 1.7rem;
  line-height: 1.1;
}

.new-booking {
  position: sticky;
  top: 0;
  z-index: 5;
  width: 100%;
  border: 0;
  padding: 26px;
  background: #1269df;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 900;
}

#dates { padding: 34px 24px; }

.date { margin-bottom: 40px; }

.date h3 {
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #555;
  font-size: 1.38rem;
  letter-spacing: .03em;
}

.date h3 sup {
  font-size: .5em;
  text-transform: lowercase;
}

.card {
  margin: 24px 0;
  padding: 22px;
  border-radius: 18px;
  background: #292929;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.facility {
  margin-bottom: 10px;
  font-size: 1.25rem;
  font-weight: 900;
}

.tag {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  color: #fff;
}

.expand {
  width: 38px;
  height: 38px;
  border: 1px solid #666;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.35rem;
}

.card.open .expand { transform: rotate(180deg); }

.time {
  margin-top: 24px;
  font-size: 1.35rem;
}

.description {
  margin-top: 18px;
  font-size: 1.22rem;
  line-height: 1.35;
}

.details {
  display: none;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #555;
}

.card.open .details { display: block; }

.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
  color: #c9c9d1;
}

.row strong {
  color: #fff;
  text-align: right;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.actions button {
  border: 0;
  border-radius: 10px;
  padding: 12px;
  background: #444;
  color: #fff;
  font-weight: 700;
}

.actions .danger { background: #d9534f; }

#formView {
  min-height: 100vh;
  background: #222;
}

#formView.active {
  display: block;
}

.form-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: calc(18px + env(safe-area-inset-top)) 20px 16px;
  border-bottom: 1px solid #444;
  background: #222;
}

.back-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #333;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.form-header h1 {
  margin: 0;
  font-size: 1.65rem;
}

.form-header p {
  margin: 4px 0 0;
  color: #aaa;
  font-size: .95rem;
}

.form-main {
  width: 100%;
  padding: 22px 24px 28px;
}

label {
  display: block;
  margin: 16px 0 7px;
  font-size: 1rem;
}

input, select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid #555;
  border-radius: 12px;
  padding: 13px 14px;
  background: #333;
  color: #fff;
  font-size: 1rem;
}

.form-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid #444;
  background: #222;
}

.form-footer button,
.modal-actions button {
  border: 0;
  border-radius: 10px;
  padding: 14px;
  font-weight: 800;
}

.primary { background: #1269df; color: #fff; }
.secondary { background: #eee; color: #1269df; }

.warning {
  min-height: 1.2em;
  margin-top: 12px;
  color: #ffb84d;
  font-size: .92rem;
  line-height: 1.35;
}

.hidden { display: none !important; }

.team-picker {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,.55);
}

.team-picker-panel {
  width: 100%;
  max-width: 520px;
  max-height: 72vh;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: #222;
}

.team-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #444;
}

.team-picker-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.team-picker-header button {
  border: 0;
  background: transparent;
  color: #4da3ff;
  font-weight: 800;
}

.team-picker-list {
  display: grid;
  gap: 1px;
  max-height: calc(72vh - 66px);
  overflow-y: auto;
  background: #444;
}

.team-picker-list button {
  width: 100%;
  border: 0;
  padding: 16px 20px;
  background: #2b2b2b;
  color: #fff;
  text-align: left;
  font-weight: 750;
}

.team-picker-list button:active {
  background: #1269df;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.72);
}

.modal-box {
  width: 100%;
  max-width: 460px;
  padding: 22px;
  border-radius: 18px;
  background: #252525;
}

.modal-box h3 { margin: 0 0 12px; }
.modal-box p { color: #eee; line-height: 1.45; }

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 380px) {
  .site-header { padding: 24px 18px 40px; }
  .logo { width: 112px; height: 112px; }
  .site-header h1 { font-size: 1.85rem; }
  .site-header h2 { font-size: 1.5rem; }
  .new-booking { padding: 22px; font-size: 1.25rem; }
  #dates { padding: 28px 18px; }
  .form-main { padding: 18px; }
  .form-footer { padding-left: 18px; padding-right: 18px; }
}
