/* Independent styles for booking-modal-general.php */
#booking-modal,
#booking-modal * {
  box-sizing: border-box;
}

#booking-modal {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  color: #111827;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#booking-modal button,
#booking-modal select,
#booking-modal input {
  font: inherit;
}

.booking-hidden {
  display: none !important;
}

.booking-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(28, 25, 23, 0.6);
}

.booking-modal-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 15px 1rem 1rem;
}

.booking-modal-card {
  position: relative;
  width: 100%;
  max-width: 1300px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.booking-modal-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 3.5rem 0.5rem 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.booking-modal-heading {
  width: 100%;
  text-align: center;
}

.booking-modal-title {
  margin: 6px 0;
  color: #111827;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
}

.booking-modal-timezone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin: 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}

.booking-modal-divider {
  display: none;
  color: #d1d5db;
}

.booking-month-select {
  max-width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  background-color: #ffffff;
  color: #1f2937;
  padding: 0.25rem 0.5rem;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.booking-refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  background-color: #ffffff;
  color: #10b981;
  padding: 0.25rem 0.5rem;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.booking-refresh-btn:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
}

.booking-refresh-icon {
  font-size: 12px;
}

.booking-modal-close-btn {
  position: absolute;
  z-index: 5;
  top: 50%;
  right: 1rem;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  background-color: #ffffff;
  color: #4b5563;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.booking-modal-close-btn:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
}

.booking-modal-body {
  padding: 0.75rem;
}

.booking-modal-status-area {
  margin-bottom: 0.5rem;
}

.booking-modal-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  text-align: center;
}

.booking-modal-status {
  white-space: pre-line;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.booking-text-muted {
  color: #6b7280;
}

.booking-status-success,
.booking-row-result-success {
  color: #16a34a;
}

.booking-status-error,
.booking-row-result-error {
  color: #dc2626;
}

.booking-weekdays-row {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
  color: #9ca3af;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
}

.booking-weekday-label {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-slot-list {
  display: grid;
  gap: 0.375rem;
}

.booking-auth-gate {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background-color: rgba(17, 24, 39, 0.54);
  padding: 5.25rem 1rem 1rem;
}

.booking-auth-panel {
  width: min(100%, 430px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0.75rem;
  background-color: #ffffff;
  box-shadow: 0 24px 60px -22px rgba(17, 24, 39, 0.42);
  padding: 1.25rem;
  text-align: center;
}

.booking-auth-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background-color: #f43f5e;
  color: #ffffff;
  font-size: 18px;
}

.booking-auth-title {
  margin: 0.75rem 0 0;
  color: #111827;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

.booking-auth-hint-text {
  margin: 0.5rem 0 0;
  color: #44403c;
  font-size: 14px;
  line-height: 1.5;
}

.booking-auth-link,
.booking-auth-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f43f5e;
  border-radius: 9999px;
  background-color: #f43f5e;
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.booking-auth-link {
  margin-top: 0.9rem;
}

.booking-auth-link:hover,
.booking-auth-submit:hover:not(:disabled) {
  border-color: #e11d48;
  background-color: #e11d48;
  transform: translateY(-1px);
}

.booking-auth-form-panel {
  display: grid;
  gap: 0.875rem;
}

.booking-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  border-radius: 0.75rem;
  background-color: #f3f4f6;
  padding: 0.25rem;
}

.booking-auth-tab {
  border: 0;
  border-radius: 0.55rem;
  background-color: transparent;
  color: #6b7280;
  padding: 0.55rem 0.5rem;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
}

.booking-auth-tab-active {
  background-color: #ffffff;
  color: #111827;
  box-shadow: 0 10px 24px -18px rgba(17, 24, 39, 0.65);
}

.booking-auth-form {
  display: grid;
  gap: 0.625rem;
}

.booking-auth-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background-color: #ffffff;
  color: #111827;
  padding: 0.7rem 0.8rem;
  font-size: 14px;
  line-height: 1.25;
  outline: none;
}

.booking-auth-input:focus {
  border-color: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12);
}

.booking-auth-result {
  min-height: 1.2em;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.booking-day-card {
  min-height: 58px;
  overflow: hidden;
  border-radius: 0.375rem;
}

.booking-day-card-active {
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
}

.booking-day-card-empty {
  border: 1px solid #e5e7eb;
  background-color: #f3f4f6;
  opacity: 0.88;
}

.booking-day-card-placeholder {
  border: 1px solid #f3f4f6;
  background-color: rgba(249, 250, 251, 0.25);
  opacity: 0.82;
}

.booking-day-card-heading {
  border-bottom: 1px solid #f3f4f6;
  padding: 0.375rem 0.5rem;
}

.booking-day-card-heading-placeholder {
  background-color: rgba(249, 250, 251, 0.25);
}

.booking-day-card-heading-muted {
  background-color: #f3f4f6;
}

.booking-day-card-heading-available {
  border-bottom-color: #a7f3d0;
  background-color: #d1fae5;
}

.booking-day-card-title {
  font-size: 13px;
  line-height: 1.15;
  text-align: center;
}

.booking-day-card-title-muted {
  color: #6b7280;
}

.booking-day-card-title-available {
  color: #065f46;
}

.booking-day-card-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
  padding: 0.375rem;
}

.booking-day-card-content-empty {
  min-height: 22px;
}

.booking-day-panel {
  border-radius: 0.25rem;
  padding: 0.125rem 0.25rem;
}

.booking-day-panel-my-bookings {
  border: 1px solid #bfdbfe;
  background-color: #eff6ff;
}

.booking-day-panel-busy {
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.booking-day-panel-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

.booking-day-panel-title-primary {
  color: #1d4ed8;
}

.booking-day-panel-title-muted {
  color: #6b7280;
}

.booking-day-panel-list {
  margin-top: 0.125rem;
}

.booking-day-panel-list > * + * {
  margin-top: 0.125rem;
}

.booking-inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.booking-my-booking-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.booking-my-booking-main,
.booking-my-booking-room,
.booking-my-booking-code {
  width: 100%;
}

.booking-my-booking-room {
  flex-wrap: nowrap;
}

.booking-room-btn {
  min-height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0 0.375rem;
  border-radius: 0.25rem;
  background-color: #ffffff;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

#booking-modal .booking-room-btn {
  min-height: 1.25rem;
  padding: 0 0.375rem;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

#booking-modal .booking-room-btn span,
#booking-modal .booking-room-btn i {
  font-size: 12px;
  line-height: 1;
}

.booking-my-booking-time {
  display: block;
  color: #1e40af;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.booking-meeting-code {
  display: inline-flex;
  align-items: center;
  min-height: 1.25rem;
  padding: 0 0.375rem;
  border: 1px solid #dbeafe;
  border-radius: 0.25rem;
  background-color: #eff6ff;
  color: #1e40af;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.booking-busy-time {
  display: block;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.booking-icon-btn {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  background-color: #ffffff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.booking-icon-btn-blue {
  border: 1px solid #93c5fd;
  color: #1d4ed8;
}

.booking-icon-btn-blue:hover {
  background-color: #dbeafe;
}

.booking-empty-label {
  color: #9ca3af;
  font-size: 13px;
  line-height: 1.15;
  text-align: center;
}

.booking-window-row {
  width: 100%;
  min-height: 28px;
  border-radius: 0.25rem;
  padding: 0.25rem 0.375rem;
  text-align: left;
}

.booking-window-row-booked {
  border: 1px solid #bfdbfe;
  background-color: #eff6ff;
}

.booking-window-row-busy {
  border: 1px solid #bae6fd;
  background-color: #f0f9ff;
}

.booking-window-row-available {
  border: 1px solid #86efac;
  background-color: #f0fdf4;
}

.booking-window-row-unavailable {
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  opacity: 0.8;
}

.booking-window-title {
  display: block;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

.booking-window-time {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
}

.booking-window-time-available {
  color: #111827;
}

.booking-window-time-muted {
  color: #6b7280;
}

.booking-window-controls {
  margin-top: 0.25rem;
}

.booking-window-controls > * + * {
  margin-top: 0.25rem;
}

.booking-window-control {
  text-align: center;
}

.booking-window-label {
  display: block;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
}

.booking-window-select {
  width: 100%;
  max-width: 150px;
  display: block;
  margin-inline: auto;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  background-color: #ffffff;
  color: #111827;
  padding: 0.125rem 0.25rem;
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
}

.booking-slot-book-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  padding: 0.125rem 0.5rem;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.booking-btn-primary {
  border-color: #f43f5e;
  background-color: #f43f5e;
  box-shadow: 0 10px 30px -12px rgba(244, 63, 94, 0.35);
}

.booking-btn-primary:hover:not(:disabled) {
  background-color: #e11d48;
  box-shadow: 0 18px 34px -14px rgba(244, 63, 94, 0.42);
  transform: translateY(-1px);
}

.booking-btn-success {
  border-color: #16a34a;
  background-color: #16a34a;
}

.booking-btn-danger {
  border-color: #dc2626;
  background-color: #dc2626;
}

.booking-is-disabled {
  cursor: not-allowed !important;
  opacity: 0.7;
}

.booking-window-hint,
.booking-row-result {
  display: block;
  margin-top: 0.125rem;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}

.booking-window-hint,
.booking-row-result-muted {
  color: #6b7280;
}

@media (min-width: 640px) {
  .booking-modal-timezone {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .booking-modal-divider {
    display: inline;
  }
}

@media (max-width: 639px) {
  .booking-auth-gate {
    padding-top: 4.5rem;
  }

  .booking-modal-card {
    border-radius: 0.625rem;
  }

  .booking-modal-header {
    padding-right: 3rem;
  }
}
