.mis-chat-shell {
  position: fixed;
  right: 1.5rem;
  bottom: 5.5rem;
  z-index: 60;
  width: min(24rem, calc(100vw - 2rem));
  height: min(50rem, calc(100vh - 7rem));
  height: min(50rem, calc(100dvh - 7rem));
  max-height: calc(100vh - 7rem);
  max-height: calc(100dvh - 7rem);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
  color: #172033;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.mis-chat-shell[data-open="true"] {
  display: flex;
}

.mis-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e5e7eb;
  background:
    radial-gradient(circle at top left, rgba(142, 27, 58, 0.12), transparent 40%),
    linear-gradient(135deg, #ffffff, #f8fafc);
}

.mis-chat-title {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: #111827;
}

.mis-chat-subtitle {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #596274;
}

.mis-chat-close {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
}

.mis-chat-messages {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(249, 250, 251, 0.88), rgba(255, 255, 255, 1));
}

.mis-chat-row {
  display: flex;
}

.mis-chat-row[data-role="user"] {
  justify-content: flex-end;
}

.mis-chat-bubble {
  max-width: 88%;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.58;
  letter-spacing: -0.006em;
  white-space: pre-wrap;
}

.mis-chat-bubble-rich {
  width: min(21rem, 92%);
  padding: 0.85rem;
  white-space: normal;
}

.mis-chat-row[data-role="assistant"] .mis-chat-bubble {
  border: 1px solid #e5e7eb;
  background: #fbfcfd;
  color: #20293a;
}

.mis-chat-row[data-role="user"] .mis-chat-bubble {
  background: #8e1b3a;
  color: #ffffff;
}

.mis-chat-rich-title {
  margin: 0.05rem 0 0.7rem;
  color: #111827;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0;
}

.mis-chat-reservation-list {
  display: grid;
  gap: 0.55rem;
}

.mis-chat-reservation-card {
  display: grid;
  gap: 0.32rem;
  padding: 0.78rem 0.82rem 0.72rem 0.95rem;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-left: 4px solid #8e1b3a;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(142, 27, 58, 0.07), rgba(255, 255, 255, 0.88) 32%);
  box-shadow: 0 2px 6px rgba(142, 27, 58, 0.07);
}

.mis-chat-reservation-resource {
  color: #111827;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
}

.mis-chat-reservation-time {
  color: #374151;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.4;
}

.mis-chat-reservation-reference {
  margin-top: 0.2rem;
  padding-top: 0.42rem;
  border-top: 1px solid rgba(142, 27, 58, 0.12);
  color: #8e1b3a;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.mis-chat-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}

.mis-chat-quick-actions button {
  border: 1px solid rgba(142, 27, 58, 0.18);
  border-radius: 999px;
  background: #fff8fb;
  color: #8e1b3a;
  padding: 0.55rem 0.8rem;
  font-family: inherit;
  font-size: 0.81rem;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
}

.mis-chat-quick-actions button[data-kind="primary"] {
  background: #8e1b3a;
  border-color: #8e1b3a;
  color: #ffffff;
}

.mis-chat-quick-actions button[data-kind="link"] {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}

.mis-chat-quick-actions .mis-chat-action-structured {
  display: grid;
  flex: 1 1 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 0.75rem;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  text-align: left;
}

.mis-chat-action-label {
  min-width: 0;
}

.mis-chat-action-structured .mis-chat-action-label {
  font-size: 0.86rem;
  font-weight: 650;
}

.mis-chat-action-detail {
  grid-column: 1;
  color: #596274;
  font-size: 0.78rem;
  font-weight: 500;
}

.mis-chat-action-reference {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #8e1b3a;
  font-size: 0.68rem;
  font-weight: 500;
  white-space: nowrap;
}

.mis-chat-quick-actions button[data-kind="primary"] .mis-chat-action-detail,
.mis-chat-quick-actions button[data-kind="primary"] .mis-chat-action-reference {
  color: rgba(255, 255, 255, 0.82);
}

.mis-chat-footer {
  border-top: 1px solid #e5e7eb;
  padding: 0.95rem 1rem 1rem;
  background: #ffffff;
}

.mis-chat-form {
  display: flex;
  gap: 0.65rem;
  align-items: flex-end;
}

.mis-chat-input {
  flex: 1 1 auto;
  min-height: 3rem;
  max-height: 7rem;
  resize: vertical;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  font: inherit;
  font-size: 0.93rem;
  line-height: 1.5;
  color: #111827;
}

.mis-chat-submit {
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  background: #8e1b3a;
  color: #ffffff;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.mis-chat-submit[disabled],
.mis-chat-input[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

.mis-chat-note {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #596274;
}

.mis-chat-status {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #6b7280;
}

.mis-contact-status {
  margin-top: 1rem;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.mis-contact-status[data-state="idle"] {
  display: none;
}

.mis-contact-status[data-state="success"] {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.mis-contact-status[data-state="error"] {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.mis-contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

body.mis-site-menu-open {
  overflow: hidden;
}

.mis-site-mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.mis-site-mobile-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.mis-site-mobile-panel {
  border-top: 1px solid #e5e7eb;
  background:
    radial-gradient(circle at top left, rgba(142, 27, 58, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.98));
}

.mis-site-mobile-panel[hidden] {
  display: none !important;
}

.mis-site-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mis-site-mobile-link {
  display: block;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font-size: 0.98rem;
  font-weight: 500;
  color: #374151;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.mis-site-mobile-link:hover,
.mis-site-mobile-link:focus-visible {
  border-color: rgba(229, 231, 235, 0.95);
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  outline: none;
}

.mis-site-mobile-link[aria-current="page"] {
  border-color: rgba(142, 27, 58, 0.18);
  background: #fff8fb;
  color: #8e1b3a;
}

.mis-site-mobile-cta {
  width: 100%;
}

@media (max-width: 640px) {
  .mis-chat-shell {
    right: 0.75rem;
    left: 0.75rem;
    top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
    width: auto;
    height: auto;
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.5rem);
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.5rem);
  }

  .mis-chat-header {
    flex: 0 0 auto;
    padding: 0.8rem 0.9rem;
  }

  .mis-chat-quick-actions,
  .mis-chat-footer {
    flex: 0 0 auto;
  }

  .mis-chat-form {
    flex-direction: column;
  }

  .mis-chat-submit {
    width: 100%;
  }

  footer .flex.gap-6.text-sm.text-text-secondary {
    flex-wrap: wrap;
    gap: 0.9rem 1.25rem;
  }
}

@media (min-width: 768px) {
  .mis-site-mobile-toggle,
  .mis-site-mobile-panel {
    display: none !important;
  }
}
