/* "Customers can't book right now" (business/bookability-alert.js): a round
   alert in the bottom corner of the Pro dashboard, with the reasons in a
   card above it. */
.bookability-alert {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 1190;
  font-family: var(--font-sans, system-ui, sans-serif);
  color: var(--color-ink, #16201c);
}

.bookability-alert.is-covered {
  display: none;
}

.bookability-alert-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #d87655;
  box-shadow: 0 10px 26px rgba(160, 74, 44, 0.34);
  cursor: pointer;
  animation: bookability-alert-in 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 160ms ease, background-color 160ms ease;
}

.bookability-alert-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #d87655;
  opacity: 0;
  animation: bookability-alert-ring 2.6s ease-out 600ms 3;
  pointer-events: none;
}

.bookability-alert-button:hover {
  background: #c96748;
  transform: translateY(-1px);
}

.bookability-alert-button:focus-visible {
  outline: 3px solid rgba(216, 118, 85, 0.4);
  outline-offset: 3px;
}

.bookability-alert-panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: min(360px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 18px 18px 16px;
  border: 1px solid var(--color-line-strong, #d9e0dc);
  border-radius: 18px;
  background: var(--color-surface, #fff);
  box-shadow: 0 18px 48px rgba(22, 32, 28, 0.18);
  animation: bookability-alert-panel-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: bottom right;
}

.bookability-alert-panel[hidden] {
  display: none;
}

.bookability-alert-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bookability-alert-panel h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 650;
}

.bookability-alert-panel h3 {
  margin: 14px 0 6px;
  color: #6b7570;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bookability-alert-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: -4px -6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #5d6762;
  background: transparent;
  cursor: pointer;
}

.bookability-alert-close:hover {
  background: #f1f3f1;
  color: #16201c;
}

.bookability-alert-body,
.bookability-alert-footer {
  margin: 8px 0 0;
  color: #4d5752;
  font-size: 14px;
  line-height: 1.5;
}

.bookability-alert-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8ece9;
  font-size: 13px;
}

.bookability-alert-panel ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bookability-alert-panel li {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fbf3ef;
  font-size: 14px;
  line-height: 1.45;
}

.bookability-alert-panel li a {
  justify-self: start;
  color: #a64f30;
  font-weight: 600;
  text-decoration: none;
}

.bookability-alert-panel li a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes bookability-alert-in {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes bookability-alert-ring {
  0% { opacity: 0.7; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.55); }
}

@keyframes bookability-alert-panel-in {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* Phones: above the dashboard's bottom tab bar. */
@media (max-width: 760px) {
  .bookability-alert {
    right: 14px;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .bookability-alert-button,
  .bookability-alert-button::after,
  .bookability-alert-panel {
    animation: none;
  }
}
