/*
Theme Name: МН Дент
Description: Тема одностраничного сайта стоматологической клиники МН Дент.
Requires PHP: 8.2
Version: 1.0.0
*/

.hero:not(:has(.hero__photo)) {
  background: var(--ink, #222);
}

.mndent-review-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.mndent-offers, .mndent-offers__more {
  margin-top: 1.5rem;
}

.mndent-offer {
  flex-direction: row;
  align-items: flex-start;
  scroll-margin-top: 1rem;
  overflow-wrap: anywhere;
}

.mndent-offer__content {
  flex: 1;
  min-width: 0;
}

.mndent-offer__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
}

.mndent-offer .mndent-offer__days,
.mndent-offer-dialog__date time {
  margin: 0;
  padding: 0;
  border: 0;
  color: #d1d1ce;
  font-size: .875rem;
}

.mndent-offer__days {
  flex-shrink: 0;
  white-space: nowrap;
}

.mndent-offer__content > * + * {
  margin-top: .65rem;
}

.mndent-offer__more {
  font-size: .875rem;
}

.mndent-offer__photo {
  flex: 0 0 auto;
  width: clamp(4rem, 7vw, 5.5rem);
  height: auto;
  aspect-ratio: 1;
  border-radius: .6rem;
}

.mndent-offer > .mndent-offer__photo { filter: saturate(.24); }

html:has(.mndent-offer-dialog[open]) {
  overflow: hidden;
}

.mndent-offer-dialog {
  width: min(calc(100% - 2rem), 38rem);
  max-height: calc(100% - 2rem);
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid #595957;
  border-radius: 1.35rem;
  background: #252525;
  color: #fff;
}

.mndent-offer-dialog::backdrop {
  background: rgb(0 0 0 / .68);
}

.mndent-offer-dialog__close {
  float: right;
  margin: 0 0 .5rem .75rem;
}

.mndent-offer-dialog__close .pill {
  width: 2.75rem;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
}

.mndent-offer-dialog h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.mndent-offer-dialog__date {
  margin-top: .5rem;
}

.mndent-offer-dialog__body {
  clear: both;
  margin-top: 1rem;
  line-height: 1.55;
}

.mndent-offer-dialog__body > * + * {
  margin-top: .75rem;
}

.mndent-offer-dialog__body blockquote {
  margin-inline: 0;
}

.mndent-offer-dialog__body img {
  width: auto;
  max-height: 16rem;
  height: auto;
  margin: .65rem auto 0;
  object-fit: contain;
}

.mndent-offer-dialog__body a {
  text-decoration: underline;
  text-underline-offset: .2em;
}

@media (max-width: 680px) {
  .mndent-offers {
    grid-template-columns: 1fr;
  }
}

.mndent-portrait {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: .75rem;
}

.mndent-team-works {
  margin-top: .75rem;
}

.doctor-card:has(.mndent-team-works) {
  position: relative;
}

.mndent-team-works__open {
  font-size: .875rem;
}

.mndent-team-works__open::after {
  position: absolute;
  inset: 0;
  border-radius: .5rem;
  content: '';
}

.mndent-team-works__open:focus-visible::after {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.doctor-card:has(.mndent-team-works) a:not(.mndent-team-works a) {
  position: relative;
  z-index: 1;
}

.mndent-price-offers a {
  display: block;
  margin-top: .25rem;
}

.mndent-locations + .mndent-locations {
  margin-top: 1.5rem;
}

.contacts__map {
  margin-top: clamp(2rem, 5vw, 4rem);
}

.contacts__map-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  margin-bottom: 1rem;
}

.contacts__map-header h3 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -.035em;
}

.contacts__map-viewer {
  position: relative;
  height: clamp(18rem, 37vw, 28rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--paper);
}

.contacts__map-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.contacts__map-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .75rem;
  color: var(--muted);
}

.contacts__map-placeholder::before {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--line);
  border-top-color: currentColor;
  border-radius: 50%;
  content: '';
}

.contacts__map-viewer[data-loading] .contacts__map-frame {
  visibility: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .contacts__map-placeholder::before {
    animation: contacts-map-spin .8s linear infinite;
  }

  @keyframes contacts-map-spin {
    to { transform: rotate(1turn); }
  }
}
