/* =====================================================
   Theodorshof Gemeinschaftsraum – Public Styles
   ===================================================== */

#tsb-wrapper {
  font-family: inherit;
  max-width: 780px;
  margin: 0 auto;
}

/* ----- Navigation ----- */
#tsb-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
#tsb-month-label {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}
#tsb-prev, #tsb-next {
  background: #2c6e4f;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s;
}
#tsb-prev:hover, #tsb-next:hover { background: #1e4f38; }

/* ----- Legend ----- */
#tsb-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
  font-size: .85rem;
  color: #444;
  align-items: center;
}
.tsb-legend-dot {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.tsb-leg-free    { background: #e8f5e9; border: 1px solid #a5d6a7; }
.tsb-leg-pending { background: #fff8e1; border: 1px solid #ffe082; }
.tsb-leg-booked  { background: #ffebee; border: 1px solid #ef9a9a; }

/* ----- Calendar Grid ----- */
#tsb-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.tsb-day-header {
  text-align: center;
  font-weight: 600;
  font-size: .8rem;
  color: #555;
  padding: 6px 0;
}
.tsb-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: .9rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
  position: relative;
  background: #f9f9f9;
}
.tsb-day:hover:not(.tsb-disabled) { border-color: #2c6e4f; }
.tsb-day.tsb-other-month { opacity: .3; pointer-events: none; }
.tsb-day.tsb-today { font-weight: 700; }
.tsb-day.tsb-past { color: #bbb; pointer-events: none; }
.tsb-day.tsb-disabled { background: #ffebee; color: #c62828; cursor: not-allowed; }
.tsb-day.tsb-pending  { background: #fff8e1; }
.tsb-day.tsb-booked   { background: #ffebee; }
.tsb-day.tsb-select-start,
.tsb-day.tsb-select-end { background: #2c6e4f; color: #fff; border-color: #1e4f38; }
.tsb-day.tsb-select-range { background: #c8e6c9; }

/* ----- Select hint ----- */
#tsb-select-hint {
  margin-top: 12px;
  font-size: .85rem;
  color: #666;
  line-height: 1.5;
}

/* ----- Booking form ----- */
#tsb-form-section {
  margin-top: 28px;
  background: #f4f8f5;
  border: 1px solid #c8e6c9;
  border-radius: 10px;
  padding: 24px 28px;
}
#tsb-form-section h3 {
  margin-top: 0;
  color: #1e4f38;
}
#tsb-selected-dates {
  font-weight: 600;
  color: #2c6e4f;
  margin-bottom: 16px;
}
.tsb-field { margin-bottom: 14px; }
.tsb-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: .9rem;
}
.tsb-req { color: #c62828; }
.tsb-field input,
.tsb-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: .95rem;
  font-family: inherit;
  transition: border .2s;
}
.tsb-field input:focus,
.tsb-field textarea:focus {
  outline: none;
  border-color: #2c6e4f;
  box-shadow: 0 0 0 3px rgba(44,110,79,.15);
}
#tsb-form-actions { display: flex; gap: 10px; margin-top: 18px; }
#tsb-submit {
  background: #2c6e4f;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 11px 26px;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s;
}
#tsb-submit:hover { background: #1e4f38; }
.tsb-btn-secondary {
  background: #fff;
  color: #444;
  border: 1px solid #ccc;
  border-radius: 7px;
  padding: 11px 20px;
  font-size: 1rem;
  cursor: pointer;
}
#tsb-msg {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 7px;
  font-size: .95rem;
}
#tsb-msg.tsb-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
#tsb-msg.tsb-error   { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }

/* ----- Captcha ----- */
.tsb-captcha-field label {
  font-size: .9rem;
}
#tsb-captcha-question {
  color: #1e4f38;
  font-weight: 700;
}
.tsb-captcha-hint {
  margin: 4px 0 0;
  font-size: .8rem;
  color: #777;
}
#tsb-captcha {
  max-width: 140px;
}

@media (max-width: 540px) {
  #tsb-form-section { padding: 16px; }
  #tsb-form-actions { flex-direction: column; }
}
