/* Модалка тренера на /coaches/ (без отдельной страницы профиля) */



button.hs-coach-card-v2.hs-coach-card-v2--modal-trigger {

  appearance: none;

  border: 0;

  padding: 0;

  margin: 0;

  width: 100%;

  height: 100%;

  background: transparent;

  font: inherit;

  color: inherit;

  text-align: inherit;

  cursor: pointer;

  display: block;

  border-radius: inherit;

}



button.hs-coach-card-v2.hs-coach-card-v2--modal-trigger:focus-visible {

  outline: 2px solid rgba(98, 54, 255, 0.85);

  outline-offset: 3px;

}



body.hs-coach-modal-open {

  overflow: hidden;

}



.hs-coach-modal[hidden] {

  display: none !important;

}



.hs-coach-modal:not([hidden]) {

  position: fixed;

  inset: 0;

  z-index: 5000;

  display: grid;

  place-items: center;

  padding: clamp(12px, 3vw, 28px);

  pointer-events: auto;

}



.hs-coach-modal__backdrop {

  position: absolute;

  inset: 0;

  z-index: 0;

  border: 0;

  padding: 0;

  margin: 0;

  cursor: pointer;

  background: rgba(6, 8, 16, 0.55);

  backdrop-filter: blur(18px) saturate(1.15);

  -webkit-backdrop-filter: blur(18px) saturate(1.15);

}



.hs-coach-modal__dialog {

  position: relative;

  z-index: 1;

  width: min(100%, 900px);

  max-height: min(88vh, 860px);

  display: flex;

  flex-direction: column;

  border-radius: 22px;

  border: 1px solid rgba(255, 255, 255, 0.12);

  background: linear-gradient(

    155deg,

    rgba(28, 32, 48, 0.72) 0%,

    rgba(18, 20, 32, 0.55) 45%,

    rgba(22, 18, 40, 0.62) 100%

  );

  box-shadow:

    0 24px 80px rgba(0, 0, 0, 0.55),

    0 0 0 1px rgba(98, 54, 255, 0.12) inset,

    0 1px 0 rgba(255, 255, 255, 0.06) inset;

  backdrop-filter: blur(22px) saturate(1.2);

  -webkit-backdrop-filter: blur(22px) saturate(1.2);

  overflow: hidden;

}



.hs-coach-modal__close {

  position: absolute;

  top: 12px;

  right: 12px;

  z-index: 5;

  display: flex;

  align-items: center;

  justify-content: center;

  width: 44px;

  height: 44px;

  border-radius: 12px;

  border: 1px solid rgba(255, 255, 255, 0.1);

  background: rgba(255, 255, 255, 0.06);

  color: var(--text, #e8ecff);

  cursor: pointer;

  transition: background 0.2s ease, border-color 0.2s ease;

}



.hs-coach-modal__close:hover {

  background: rgba(255, 255, 255, 0.1);

  border-color: rgba(255, 255, 255, 0.16);

}



.hs-coach-modal__close:focus-visible {

  outline: 2px solid rgba(98, 54, 255, 0.9);

  outline-offset: 2px;

}



.hs-coach-modal__mount {

  flex: 1;

  min-height: 0;

  padding: 14px 14px 12px;

  padding-top: 56px;

}



.hs-coach-modal__loading {

  margin: 0;

  padding: 48px 24px;

  text-align: center;

  color: var(--muted, #9aa3bd);

  font-size: 15px;

}



.hs-coach-modal-profile__links .hs-coach-links__pill {

  display: inline-flex;

  align-items: center;

  padding: 8px 12px;

  border-radius: 999px;

  border: 1px solid var(--line, rgba(255, 255, 255, 0.14));

  background: rgba(255, 255, 255, 0.04);

  color: var(--text, #e8ecff);

  text-decoration: none;

  font-size: 15px;

  font-weight: 600;

  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;

}

.hs-coach-links__icon {

  width: 13px;

  height: 13px;

  margin-right: 4px;

  flex-shrink: 0;

}

.hs-coach-links__icon--img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}



.hs-coach-links__pill--text {
  padding-inline: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hs-coach-modal-profile__links .hs-coach-links__pill:hover {

  transform: translateY(-2px);

  border-color: rgba(98, 54, 255, 0.45);

  background: rgba(98, 54, 255, 0.12);

}



/* 3D flip */

.hs-coach-modal-flip {

  perspective: 1400px;

  height: 100%;

  min-height: clamp(360px, 54vh, 520px);

}



.hs-coach-modal-flip__inner {

  position: relative;

  height: 100%;

  min-height: clamp(360px, 54vh, 520px);

  transform-style: preserve-3d;

  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);

}



.hs-coach-modal-flip.is-flipped .hs-coach-modal-flip__inner {

  transform: rotateY(180deg);

}



.hs-coach-modal-flip__face {

  position: absolute;

  inset: 0;

  display: flex;

  flex-direction: column;

  backface-visibility: hidden;

  -webkit-backface-visibility: hidden;

  overflow: hidden;

  border-radius: 16px;

}



.hs-coach-modal-flip__face--back {

  transform: rotateY(180deg);

}



.hs-coach-modal-flip__scroll {

  flex: 1;

  min-height: 0;

  overflow-y: auto;

  overflow-x: hidden;

  padding-right: 4px;

  -webkit-overflow-scrolling: touch;

}



.hs-coach-modal-flip__scroll--calendar {

  padding-right: 0;

  display: flex;

  overflow-y: hidden;

}



.hs-coach-modal-flip__toolbar {

  flex-shrink: 0;

  display: flex;

  justify-content: center;

  padding: 10px 10px 8px;

  border-top: 1px solid rgba(255, 255, 255, 0.06);

  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.28) 100%);

}



.hs-coach-modal-flip__toolbar--back {

  margin-top: 0;

}



/* Сегмент снизу: Профиль | Календарь */

.hs-coach-modal-nav {

  display: inline-flex;

  align-items: center;

  gap: 4px;

  padding: 5px;

  border-radius: 999px;

  border: 1px solid rgba(255, 255, 255, 0.1);

  background: rgba(4, 6, 14, 0.55);

  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);

  max-width: 100%;

  flex-wrap: wrap;

  justify-content: center;

}



.hs-coach-modal-nav__pill {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  gap: 8px;

  min-height: 40px;

  padding: 0 16px;

  border: 0;

  border-radius: 999px;

  background: transparent;

  color: rgba(210, 218, 245, 0.88);

  font-size: 15px;

  font-weight: 700;

  letter-spacing: 0.01em;

  cursor: default;

  font-family: inherit;

  line-height: 1.2;

  white-space: nowrap;

}



.hs-coach-modal-nav__pill i {

  width: 16px;

  height: 16px;

  flex-shrink: 0;

  opacity: 0.9;

  stroke-width: 2.1px;

}



button.hs-coach-modal-nav__pill {

  cursor: pointer;

  color: rgba(230, 234, 255, 0.9);

  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;

}



button.hs-coach-modal-nav__pill:hover {

  background: rgba(98, 54, 255, 0.12);

  color: #fff;

  box-shadow: 0 0 18px rgba(98, 54, 255, 0.12);

}



button.hs-coach-modal-nav__pill:focus-visible {

  outline: 2px solid rgba(98, 54, 255, 0.75);

  outline-offset: 2px;

}



.hs-coach-modal-nav__pill.is-active {

  background: linear-gradient(135deg, rgba(98, 54, 255, 0.42) 0%, rgba(69, 32, 192, 0.48) 100%);

  color: #fff;

  box-shadow:

    0 6px 24px rgba(45, 18, 118, 0.32),

    inset 0 1px 0 rgba(255, 255, 255, 0.16);

}



@media (max-width: 400px) {

  .hs-coach-modal-nav__pill {

    padding: 0 12px;

    min-height: 38px;

    font-size: 14px;

  }

}

@media (max-width: 900px) {

  .hs-coach-modal__dialog {

    width: min(100%, 760px);

    max-height: min(90vh, 760px);

  }

  .hs-coach-modal-flip,

  .hs-coach-modal-flip__inner {

    min-height: clamp(340px, 58vh, 500px);

  }

}



.hs-coach-modal-profile {

  display: flex;

  flex-direction: column;

  gap: 12px;

  align-items: stretch;

  width: min(100%, 620px);

  margin: 0 auto;

}



@media (max-width: 640px) {

  .hs-coach-modal__dialog {

    border-radius: 18px;

  }

  .hs-coach-modal__mount {

    padding: 12px 10px 10px;

    padding-top: 52px;

  }

  .hs-coach-modal-flip,

  .hs-coach-modal-flip__inner {

    min-height: clamp(300px, 62vh, 440px);

  }

  .hs-coach-modal-profile {

    width: min(100%, 540px);

    text-align: center;

  }



  .hs-coach-modal-profile__body {

    align-items: center;

    text-align: center;

  }



  .hs-coach-modal-profile__links,

  .hs-coach-modal-profile__actions {

    justify-content: center;

  }

}



.hs-coach-modal-profile__media {

  position: static;

  display: flex;

  justify-content: center;

}



.hs-coach-modal-profile__photo {

  width: 100%;

  max-width: 144px;

  aspect-ratio: 1;

  object-fit: cover;

  border-radius: 18px;

  border: 1px solid rgba(255, 255, 255, 0.12);

  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);

}



.hs-coach-modal-profile__photo--placeholder {

  display: flex;

  align-items: center;

  justify-content: center;

  background: rgba(255, 255, 255, 0.04);

  border: 1px dashed rgba(255, 255, 255, 0.18);

  color: var(--muted, #9aa3bd);

}



.hs-coach-modal-profile__body {

  display: flex;

  flex-direction: column;

  gap: 8px;

  min-width: 0;

  align-items: center;

  text-align: center;

}



.hs-coach-modal-profile__name {

  margin: 0;

  text-align: center;

  font-size: clamp(1.35rem, 3vw, 1.85rem);

  line-height: 1.15;

  color: var(--text, #e8ecff);

}



.hs-coach-modal-profile__role {

  margin: 0;

  text-align: center;

  color: rgba(219, 230, 255, 0.82);

  font-size: 14px;

  font-weight: 600;

}



.hs-coach-modal-profile__bio {

  margin: 0;

  font-size: 14px;

  line-height: 1.55;

  color: var(--muted, #b4bdd6);

}

.hs-coach-modal-profile__bio a {
  color: #9eb4ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hs-coach-modal-profile__bio a:hover {
  color: #c5d4ff;
}



.hs-coach-modal-profile__tags {

  display: flex;

  flex-wrap: wrap;

  justify-content: center;

}



.hs-coach-modal-profile__links {

  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  justify-content: center;

}



.hs-coach-modal-profile__actions {

  display: flex;

  flex-wrap: wrap;

  gap: 10px;

  margin-top: 4px;

  justify-content: center;

}



.hs-coach-calendar-card--modal {

  margin: 0;

  border-radius: 14px;

  padding: 14px 12px 16px;

  background: rgba(12, 14, 24, 0.45);

  display: flex;

  flex-direction: column;

  min-height: clamp(360px, 58vh, 520px);

  max-height: 100%;

  width: min(100%, 760px);

  margin-inline: auto;

}



.hs-coach-calendar-card--modal .hs-coach-week-grid-wrap {

  flex: 1;

  min-height: 0;

  max-width: 100%;

  overflow-x: hidden;

  padding: 6px 4px 8px;

  margin-top: 10px;

}

.hs-coach-calendar-card--modal .hs-coach-week-grid {

  grid-template-columns: 62px repeat(7, minmax(0, 1fr));

  min-width: 0;

}

@media (max-width: 900px) {

  .hs-coach-calendar-card--modal {

    min-height: clamp(340px, 56vh, 470px);

  }

  .hs-coach-calendar-card--modal .hs-coach-week-grid {

    grid-template-columns: 56px repeat(7, minmax(0, 1fr));

    min-width: 0;

  }

}

@media (max-width: 640px) {

  .hs-coach-calendar-card--modal {

    min-height: clamp(320px, 52vh, 420px);

    padding: 12px 10px 12px;

  }

  .hs-coach-calendar-card--modal .hs-coach-week-grid-wrap {

    margin-top: 8px;

    padding: 5px 4px 7px;

  }

}



@media (prefers-reduced-motion: reduce) {

  .hs-coach-modal-flip__inner {

    transition: none;

  }

}

