/* ---- Provider quick-view modal (app/views/providers/preview.html.erb) ---- */
.modal {
  width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  padding: 0; border: 0; border-radius: 22px; background: var(--card); color: var(--ink);
  box-shadow: 0 24px 60px rgba(17, 17, 17, 0.3);
  overflow-y: auto; /* scroll inside the modal on short screens */
}
.modal::backdrop { background: rgba(17, 17, 17, 0.55); }
.modal[open] { animation: modal-in 0.18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
body:has(.modal[open]) { overflow: hidden; } /* stop the page scrolling behind */

.modal__head { display: flex; align-items: center; gap: 16px; padding: 24px; border-bottom: 1px solid var(--line); }
.modal__title { flex: 1; min-width: 0; }
.modal__title h2 { font-size: 1.6rem; }
.modal__title h2 .star { margin-left: 4px; vertical-align: 0; }
.modal__title p { margin-top: 4px; }
.modal__close {
  display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
}
.modal__close:hover { background: var(--tint); }

.modal__body { padding: 20px 24px 8px; display: grid; gap: 18px; }
/* Call | WhatsApp | Email, with Call widest. Flex so it still looks right without WhatsApp. */
.modal__actions { display: flex; gap: 10px; }
.modal__actions .btn { flex: 1; }
.modal__actions .btn--primary { flex: 1.6; }
.modal__summary { font-size: 1rem; color: #333333; }
.modal__body .eyebrow { margin-bottom: -10px; }
.modal__services { gap: 8px; }

.modal__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px 24px; }
.modal__foot a.muted { font-size: 0.9rem; text-underline-offset: 3px; }

.avatar--lg { width: 60px; height: 60px; border-radius: 12px; font-size: 1.4rem; }
.btn--lg { padding: 13px 20px; font-size: 1rem; }
.tag--check { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 0.88rem; }
.tag--check .icon { color: var(--green); width: 0.95em; height: 0.95em; }

/* Bordered 2-column grid of facts (Coverage / Opening hours / Fleet ...) */
.facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.facts div:nth-child(odd) { border-right: 1px solid var(--line); }
.facts div:nth-last-child(-n + 2) { border-bottom: 0; }
.facts dt { font-size: 0.82rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; word-break: break-word; }
.facts a { text-decoration: none; }
.facts .facts__extra { font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.facts .facts__extra a { color: #0e6b37; font-weight: 600; }

@media (max-width: 520px) {
  .modal__actions { flex-wrap: wrap; }
  .modal__actions .btn--primary { flex-basis: 100%; } /* Call full width, WhatsApp + Email below */
  .facts { grid-template-columns: 1fr; }
  .facts div:nth-child(odd) { border-right: 0; }
  .facts div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .modal__foot { flex-direction: column-reverse; align-items: stretch; text-align: center; }
}
