/* Visitor experience: one primary action, with optional details on demand. */
.visitor-app {
  --visitor-mint: #a5e8d1;
  --visitor-ink: #17372e;
  --visitor-muted: #9baead;
  color-scheme: dark;
  background: #101719;
  background-image: radial-gradient(ellipse at 50% 30%, #21352f65, transparent 62%);
  color: #eef4f2;
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.visitor-app [hidden] { display: none !important; }
.visitor-shell { width: min(100%, 500px); min-height: 100svh; margin: auto; padding: 28px 24px 24px; display: flex; flex-direction: column; justify-content: center; }
.visitor-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 32px; padding-inline: 4px; }
.visitor-brand { display: inline-flex; align-items: center; gap: 8px; color: #edf4f0; font-size: 20px; font-weight: 650; letter-spacing: -.8px; text-decoration: none; }
.visitor-brand svg { width: 22px; height: 22px; color: var(--visitor-mint); }
.visitor-brand > span { color: var(--visitor-mint); margin-left: -7px; }
.door-card { position: relative; background: linear-gradient(155deg, #1a2729, #152023 65%); border: 1px solid #32413f; border-radius: 28px; padding: 38px 30px 22px; box-shadow: 0 24px 80px #0000001c; overflow: hidden; }
.door-accent { position: absolute; top: 0; left: 35%; width: 30%; height: 1px; background: linear-gradient(90deg, transparent, #b6f0d7, transparent); }
.bell-stage { width: 264px; height: 264px; position: relative; display: grid; place-items: center; margin: 6px auto 30px; }
.bell-orbit { position: absolute; border: 1px solid #a5e8d110; border-radius: 50%; pointer-events: none; }
.orbit-outer { inset: 0; }
.orbit-inner { inset: 18px; border-color: #a5e8d120; }
.orbit-outer::after { content: ''; position: absolute; width: 5px; height: 5px; background: #749c8d; border-radius: 50%; left: 37px; top: 36px; box-shadow: 0 0 10px #a5e8d125; }
.visitor-bell { width: 184px; height: 184px; border-radius: 50%; background: linear-gradient(150deg, #c2f4df, #91ceb9); border: 1px solid #d4ffeb80; color: var(--visitor-ink); box-shadow: 0 0 44px #9be4ce0d, inset 0 2px 0 #e2fff380, 0 8px 20px #0002; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font: 600 14px var(--font-sans); cursor: pointer; z-index: 1; transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease; -webkit-tap-highlight-color: transparent; }
.visitor-bell-icon { width: 49px; height: 49px; }
.visitor-bell:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 0 50px #9be4ce20, inset 0 2px 0 #e2fff380, 0 12px 24px #0003; }
.visitor-bell:active:not(:disabled) { transform: scale(.97); }
.visitor-bell:disabled { opacity: .5; cursor: default; }
.visitor-bell[aria-busy="true"] { opacity: .85; cursor: progress; }
.bell-stage:has([aria-busy="true"]) .orbit-inner { border-color: #a5e8d120; border-top-color: #a5e8d1; animation: visitor-orbit 2s linear infinite; }
@keyframes visitor-orbit { to { transform: rotate(360deg); } }
.bell-feedback { margin-bottom: 20px; text-align: center; min-height: 22px; font-size: 12px; line-height: 1.7; color: #bdd0c8; max-width: 330px; margin-inline: auto; overflow-wrap: anywhere; }
.bell-feedback[data-tone="error"] { color: #edbb94; background: #edbb9408; border: 1px solid #edbb9426; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.visitor-details { border-top: 1px solid #31413e; }
.visitor-details summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0 0; cursor: pointer; color: #c1ceca; font-size: 12px; list-style: none; min-height: 44px; }
.visitor-details summary::-webkit-details-marker { display: none; }
.details-plus { font-size: 20px; font-weight: 400; color: var(--visitor-muted); }
.visitor-details[open] .details-plus { transform: rotate(45deg); }
.visitor-details-content { padding-top: 20px; }
.visitor-app label { display: block; color: #acbfbb; font-size: 11px; margin-bottom: 8px; }
.visitor-input { width: 100%; min-width: 0; min-height: 44px; background: #101b1d; color: #eef4f2; border: 1px solid #41524e; border-radius: 10px; padding: 12px; font: 13px var(--font-sans); }
.visitor-input::placeholder { color: #96aaa5; }
.visitor-reasons { display: flex; gap: 8px; margin-bottom: 18px; }
.visitor-app .reason-chip { display: inline-flex; min-height: 40px; padding: 9px 16px; border-radius: 9px; font: 12px var(--font-sans); border: 1px solid #41524e; background: transparent; color: #acbfbb; }
.visitor-app .reason-chip.active { background: #a5e8d112; border-color: #a5e8d155; color: var(--visitor-mint); box-shadow: none; transform: none; }
.access-details { margin-top: 16px; }
.access-details > summary { color: #b0c1bb; font-size: 11px; padding: 12px; cursor: pointer; list-style: none; }
.access-details > summary::-webkit-details-marker { display: none; }
.access-content { margin: 12px 0 20px; text-align: left; border: 1px solid #31413e; border-radius: 14px; padding: 20px; background: #152023; }
.access-content p { font-size: 12px; color: #acbfbb; margin-bottom: 16px; }
.access-content p:empty { display: none; }
.access-content p:last-child { margin-bottom: 0; }
.access-input-row { display: flex; gap: 8px; margin-bottom: 12px; }
.visitor-secondary { min-height: 44px; border: 1px solid #4e685f; border-radius: 10px; background: #a5e8d10a; color: var(--visitor-mint); padding: 10px 16px; font: 500 12px var(--font-sans); cursor: pointer; }
.visitor-secondary:hover { background: #a5e8d118; }
.visitor-secondary:disabled { opacity: .5; cursor: wait; }
.visitor-success { text-align: center; padding: 42px 0 18px; }
.success-orbit { width: 126px; height: 126px; display: grid; place-items: center; margin: 0 auto 28px; border: 1px solid #a5e8d145; border-radius: 50%; background: #a5e8d108; box-shadow: 0 0 0 15px #a5e8d103; color: var(--visitor-mint); }
.success-orbit svg { width: 56px; height: 56px; }
.visitor-success h2 { font: 600 23px var(--font-sans); letter-spacing: -.7px; }
.visitor-success p { color: #acbfbb; font-size: 13px; line-height: 1.8; margin: 12px 0 32px; }
.visitor-app :is(button, a, summary, input):focus-visible { outline: 2px solid var(--visitor-mint); outline-offset: 5px; }
.visitor-app #successTitle:focus { outline: none; }
.noscript-notice { padding: 20px; text-align: center; }
@media (max-width: 480px) {
  .visitor-shell { padding: 22px 20px; }
  .visitor-header { margin-bottom: 24px; }
  .door-card { padding: 30px 22px 20px; border-radius: 24px; }
  .bell-stage { width: 240px; height: 240px; margin-top: 6px; }
  .visitor-bell { width: 172px; height: 172px; }
  .visitor-input { font-size: 16px; }
}
@media (max-width: 350px) {
  .visitor-shell { padding-inline: 14px; }
  .door-card { padding-inline: 18px; }
  .bell-stage { width: 220px; height: 220px; }
  .visitor-bell { width: 158px; height: 158px; }
}
@media (prefers-reduced-motion: reduce) {
  .visitor-app *, .visitor-app *::before, .visitor-app *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Visitor Response Banner from Chime/Homeowner */
.visitor-response-box {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 16px;
  padding: 16px 18px;
  margin: 18px 0 24px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
  animation: visitor-response-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes visitor-response-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.response-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.4));
  flex-shrink: 0;
}
.response-badge {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #34d399;
  margin-bottom: 4px;
}
.response-text {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
}
