/* ========================================
   THERAPIST PROFILE PAGE (NEW UI)
   ======================================== */

.tpg-page {
  background: #fffefd;
}

.is-hidden {
  display: none !important;
}

/* Loading and state messages */
.loading-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #fffefd;
  z-index: 9999;
  transition: opacity 0.25s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid #e3f1ec;
  border-top-color: #447569;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 14px;
}

.loading-text {
  font-size: 18px;
  font-weight: 500;
  color: #447569;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.main-content-wrapper {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.main-content-wrapper.visible {
  opacity: 1;
}

.under-review-message,
.not-found-message {
  min-height: clamp(360px, 55vh, 620px);
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 48px);
}

.under-review-content,
.not-found-content {
  width: min(560px, 100%);
  text-align: center;
}

.under-review-text,
.not-found-text {
  color: #447569;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  font-weight: 500;
}

/* Main wrapper */
.profile-page {
  width: 100%;
}

#profile-content {
  width: 100%;
}

/* Page grid */
.profile-grid {
  max-width: 1400px;
  margin: 0 auto 0 auto;
  padding: clamp(24px, 3vw, 56px) clamp(0px, 0vw, 0px) clamp(44px, 5vw, 72px);
  display: grid;
  grid-template-columns: clamp(0px, 0vw, 0px) minmax(260px, 320px) minmax(0, 1fr) minmax(0, 1fr) clamp(0px, 0vw, 0px);
  gap: clamp(18px, 2vw, 28px);
  align-items: start;
}

/* Top profile card */
.top-profile-card {
  grid-column: 2 / 5;
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 96px);
  position: relative;
  border-radius: 14px;
  padding: clamp(26px, 3.8vw, 42px) clamp(24px, 3vw, 48px);
  background: linear-gradient(180deg, #e3f1ec 0%, #fdfdf4 100%);
  box-shadow: 0 13px 45px rgba(0, 0, 0, 0.16);
}

.hero-photo-slot {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  aspect-ratio: 1 / 1;
  width: 100%;
  min-height: 0;
  border: 1px solid rgba(68, 117, 105, 0.18);
  display: grid;
  place-items: center;
}

.hero-photo-slot.is-empty {
  border-style: dashed;
}

.hero-photo-slot.is-empty .hero-photo {
  display: none;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-info {
  min-width: 0;
  display: grid;
  gap: 0;
  align-content: start;
}

/* Requested top-to-bottom rhythm in hero-info: 7, 7, 25, 25 */
.hero-info .subtitle {
  margin-top: 7px;
}

.hero-info .tags {
  margin-top: 7px;
}

.hero-info .details {
  margin-top: 25px;
}

.hero-info .supervision {
  margin-top: 25px;
}

.hero-info .hero-actions {
  margin-top: 25px;
}

.hero-info h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #447569;
  font-weight: 800;
}

.hero-info .subtitle {
  font-size: clamp(19px, 2.2vw, 26px);
  color: #699187;
  font-weight: 500;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  border-radius: 100px;
  padding: 7px 16px;
  border: 1px solid #e3ede9;
  background: #ffffff;
  color: #000;
  font-size: 15px;
  line-height: 1.2;
}

.details {
  display: grid;
  gap: 15px;
}

.details p {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(15px, 1.45vw, 18px);
  line-height: 1.45;
  color: #111;
}

.detail-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.supervision {
  font-size: 15px;
  color: #425b56;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn.btn-book {
  border-radius: 999px;
  background: linear-gradient(94deg, #f99522 9%, #fee478 136%);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: inset 0 -4px 10px rgba(255, 214, 93, 0.7);
}

.btn.btn-save {
  border-radius: 999px;
  border: 1px solid #447569;
  background: rgba(255, 255, 255, 0.82);
  color: #447569;
  font-size: 18px;
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn.btn-save.is-saved {
  background: rgba(68, 117, 105, 0.14);
}

.action-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.matching-score {
  position: absolute;
  right: 0;
  top: clamp(52px, 8vw, 88px);
  width: 146px;
  height: 84px;
  background: #447569;
  color: #fff;
  display: grid;
  place-items: center;
  border-radius: 0 12px 12px 0;
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 20% 100%, 0 50%);
}

.score-label {
  font-size: 12px;
  font-style: italic;
  line-height: 1;
}

.score-value {
  font-size: 42px;
  line-height: 0.95;
  font-style: italic;
  font-weight: 600;
}

/* Left column */
.left-column {
  grid-column: 2 / 3;
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: none;
  overflow: visible;
  display: grid;
  gap: 2vw;
}

.session-summary {
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
  border-radius: 12px;
  position: relative;
  z-index: 1;
  box-shadow: none;
  padding: clamp(22px, 2.7vw, 44px) clamp(18px, 3vw, 40px);
  box-shadow: 0 4px 50px rgba(0, 0, 0, 0.1);
}

.session-title {
  font-size: 19px;
  font-style: italic;
  font-weight: 700;
  color: #0e2a2e;
  margin-bottom: 18px;
}

.session-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid #e8efec;
}

.session-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.session-icon-img {
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.session-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: #0e2a2e;
  line-height: 1.35;
  margin-bottom: 3px;
}

.session-content p {
  font-size: 14px;
  line-height: 1.45;
  color: #6c8288;
}

.sidebar-nav-links {
  background: transparent;
  border-radius: 0 0 12px 12px;
  box-shadow: none;
  padding: clamp(18px, 2.2vw, 30px);
  display: grid;
  gap: 14px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5a7c74;
  font-size: 17px;
  font-style: italic;
  transition: all 0.25s ease;
}

.nav-link .arrow {
  opacity: 0;
  width: 0;
  transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #447569;
  font-weight: 600;
}

.nav-link.active .arrow {
  opacity: 1;
  width: 16px;
}

.sidebar-book-wrap {
  margin-top: 6px;
}

.btn.btn-book.btn-full {
  width: 100%;
  min-width: 0;
}

/* Continuous info block */
.therapist-info-block {
  grid-column: 3 / 5;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 50px rgba(0, 0, 0, 0.1);
  padding: clamp(24px, 4vw, 60px);
}

.content-section {
  width: 100%;
}

.content-section + .content-section {
  margin-top: clamp(30px, 5vw, 56px);
  padding-top: clamp(30px, 5vw, 56px);
  border-top: 1px solid #e6ece8;
}

.content-section h2 {
  font-size: 20px;
  line-height: 1.2;
  color: #0e2a2e;
  font-style: italic;
  font-weight: 700;
  margin-bottom: 20px;
}

.content-section h3 {
  font-size: 16px;
  line-height: 1.2;
  color: #0e2a2e;
  font-weight: 600;
  margin: 26px 0 14px;
}

.content-section p {
  color: #0e2a2e;
  font-size: 16px;
  line-height: 1.6;
}

/* Specialties */
.specialty-list {
  display: grid;
  gap: 10px;
}

.specialty-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  border-radius: 8px;
  overflow: hidden;
}

.spec-label {
  background: linear-gradient(90deg, #daf2e8 0%, #e3f1ec 100%);
  color: #0e2a2e;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.spec-desc {
  background: linear-gradient(90deg, #e3f1ec 0%, #fdfdf4 55.89%, #e5f6ff 100%);
  color: #0e2a2e;
  font-size: 13px;
  line-height: 1.35;
  padding: 11px 16px;
  display: flex;
  align-items: center;
}

.therapy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.therapy-tag {
  border: 1px solid #85a79e;
  border-radius: 8px;
  background: #f8fbf9;
  padding: 11px 14px;
  color: #0e2a2e;
  font-size: 14px;
  font-weight: 600;
}

/* Assessment */
.eval-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
}

.eval-categories {
  display: grid;
  gap: 8px;
}

.eval-cat {
  height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #0e2a2e;
  font-size: 14px;
  font-weight: 500;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.eval-cat .score {
  font-size: 20px;
  font-weight: 500;
}

.eval-cat.eval-empathy {
  background: #faefec;
}

.eval-cat.eval-listening {
  background: #e8ebfa;
}

.eval-cat.eval-feedback {
  background: #fae9f4;
}

.eval-cat.eval-reflection {
  background: #edf2e9;
}

.eval-cat.eval-professionalism {
  background: #e6e5ef;
}

.eval-cat.selected {
  border-color: #233633;
}

.eval-detail-container {
  border-radius: 8px;
  padding: 18px;
  background: #faefec;
  min-height: 190px;
}

.eval-detail-container.detail-empathy {
  background: #faefec;
}

.eval-detail-container.detail-activeListening {
  background: #e8ebfa;
}

.eval-detail-container.detail-feedback {
  background: #fae9f4;
}

.eval-detail-container.detail-reflection {
  background: #edf2e9;
}

.eval-detail-container.detail-professionalism {
  background: #e6e5ef;
}

.eval-detail-container h4 {
  font-size: 16px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.eval-detail-container p {
  color: #66777d;
  font-size: 15px;
  line-height: 1.5;
}

/* Radar */
.radar-wrap {
  margin-top: 6px;
  margin-bottom: 30px;
  border-radius: 10px;
  background: transparent;
  min-height: 312px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  transform: scale(0.75);
}

.radar-skeleton {
  width: min(520px, 100%);
  height: auto;
  user-select: none;
  pointer-events: none;
}

.radar-overlay {
  position: absolute;
  width: min(520px, 100%);
  height: auto;
  inset: 0;
  margin: auto;
  pointer-events: none;
}

/* Transcript */
.transcript {
  margin-top: 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f3f9f1 0%, #eaf4ee 78.37%, #dcf2e9 100%);
  padding: clamp(16px, 2vw, 24px);
  display: grid;
  gap: 14px;
}

.message {
  display: grid;
  gap: 6px;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #3e4f53;
}

.message-header img {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
}

.message.user {
  justify-items: end;
}

.message.user .message-header {
  flex-direction: row-reverse;
}

.message.user .message-bubble {
  background: rgba(68, 117, 105, 0.65);
  color: #fff;
  border-radius: 12px 12px 2px 12px;
}

.message.ai {
  justify-items: start;
}

.message.ai .message-bubble {
  background: rgba(213, 228, 224, 0.8);
  color: #2f3f3e;
  border-radius: 12px 12px 12px 2px;
}

.message-bubble {
  max-width: min(86%, 520px);
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
}

.message-time {
  font-size: 10px;
  color: #728f87;
}

/* Practice */
.practice-box {
  border: 1px solid #b8d4e3;
  border-radius: 12px;
  background: linear-gradient(180deg, #fdfdf4 0%, #e3f1ec 78%, #daf2e8 100%);
  padding: 18px 20px;
  margin-top: 10px;
}

.practice-box + .practice-box {
  margin-top: 14px;
}

.practice-box p {
  font-size: 15px;
  line-height: 1.56;
  margin-bottom: 8px;
}

.practice-box p:last-child {
  margin-bottom: 0;
}

.practice-box p strong {
  font-weight: 700;
}

/* License */
.license-content {
  display: grid;
  gap: 10px;
}

.license-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.license-row img {
  width: 20px;
  height: 20px;
}

.license-text {
  font-size: 16px;
  font-weight: 500;
}

/* Booking */
.booking-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 56px minmax(135px, 1fr);
  gap: 38px;
  align-items: start;
}

.divider {
  align-self: stretch;
  position: relative;
}

.divider::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-right: 1px dashed #c7d6d1;
}

.calendar {
  min-width: 0;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
}

.cal-nav {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #044343;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  border: 0;
}

.cal-month {
  font-size: 19px;
  color: #0e2a2e;
  letter-spacing: 0.35px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.cal-day-label {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: #3c413f;
  padding: 10px 0;
}

.cal-date {
  width: 90%;
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #bfc9c9;
  font-size: 15px;
  font-weight: 500;
  transition: 0.2s ease;
  position: relative;
  z-index: 0;
}

.cal-date::before {
  content: "";
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  background: transparent;
  z-index: -1;
}

.cal-date.in-month.unavailable {
  color: #9eabab;
}

.cal-date.in-month.available {
  color: #1f2a2b;
}

.cal-date.in-month.available::before {
  background: rgba(4, 67, 67, 0.12);
}

.cal-date.in-month.selected {
  color: #fff;
}

.cal-date.in-month.selected::before {
  background: #447569;
}

.cal-date.selected {
  color: #fff;
}

.cal-date.selected::before {
  background: #447569;
}

.cal-date.out-month {
  color: #d0d7d7;
}

.cal-date:hover {
  filter: brightness(0.98);
}

.time-slots {
  min-width: 0;
  width: min(264px, 100%);
  justify-self: center;
}

.time-slots h4 {
  margin: 0 0 10px;
  color: #192020;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
}

.time-slot-list {
  display: grid;
  gap: 10px;
}

.time-slot {
  border-radius: 6px;
  border: 1px solid rgba(4, 67, 67, 0.32);
  background: #fff;
  color: #0e2a2e;
  padding: 18px 19px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
}

.time-slot:hover {
  background: rgba(4, 67, 67, 0.06);
}

.time-slot.selected {
  background: #447569;
  border-color: #447569;
  color: #fff;
}

.no-slots {
  color: #748a8b;
  font-size: 14px;
  line-height: 1.45;
}

.booking-action {
  margin-top: 42px;
  display: flex;
  justify-content: center;
}

.booking-action .btn-book {
  min-width: 230px;
}

/* Tablet */
@media (max-width: 1199px) {
  .profile-grid {
    grid-template-columns: 16px minmax(240px, 300px) minmax(0, 1fr) 16px;
  }

  .top-profile-card {
    grid-column: 2 / 4;
    grid-template-columns: minmax(180px, 290px) minmax(0, 1fr);
  }

  .left-column {
    grid-column: 2 / 3;
  }

  .therapist-info-block {
    grid-column: 3 / 4;
  }

  .eval-layout {
    grid-template-columns: 1fr;
  }

  .eval-detail-container {
    min-height: 0;
  }

  .booking-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .divider {
    display: none;
  }
}

@media (min-width: 1200px) {
  .profile-grid {
    grid-template-columns: clamp(0px, 0vw, 0px) minmax(260px, 320px) 75px minmax(0, 1fr) minmax(0, 1fr) clamp(0px, 0vw, 0px);
    column-gap: 0;
    row-gap: 34px;
  }

  .top-profile-card {
    grid-column: 2 / 6;
    gap: clamp(28px, 6vw, 96px);
  }

  .left-column {
    grid-column: 2 / 3;
  }

  .therapist-info-block {
    grid-column: 4 / 6;
  }

  .booking-layout {
    grid-template-columns: minmax(333px, 451px) 56px minmax(135px, 1fr);
    gap: 38px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .profile-grid {
    grid-template-columns: 16px 1fr 16px;
    gap: 16px;
    padding-top: 16px;
  }

  .top-profile-card {
    grid-column: 2;
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .hero-photo-slot {
    min-height: 250px;
  }

  .hero-info h1 {
    font-size: clamp(28px, 8.8vw, 40px);
  }

  .hero-info .subtitle {
    font-size: 18px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-actions .btn {
    min-width: 0;
    width: 100%;
    font-size: 17px;
  }

  .matching-score {
    position: static;
    clip-path: none;
    border-radius: 12px;
    width: 136px;
    height: 136px;
    margin-top: 8px;
  }

  .left-column {
    display: none;
  }

  .therapist-info-block {
    grid-column: 2;
    padding: 22px 16px;
  }

  .specialty-item {
    grid-template-columns: 1fr;
  }

  .spec-label,
  .spec-desc {
    white-space: normal;
  }

  .cal-grid {
    gap: 6px;
  }

  .cal-date {
    font-size: 14px;
  }

  .booking-action .btn-book {
    width: 100%;
    min-width: 0;
  }

  .message-bubble {
    max-width: 100%;
  }
}

/* -----------------------------------------
   Booking flow (patient booking + success)
   ----------------------------------------- */
.cal-timezone {
  margin-top: 12px;
  font-size: 13px;
  color: #6D6F75;
  text-align: center;
}

.booking-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 160ms ease-out;
}

.booking-modal[hidden] {
  display: none;
}

.booking-modal.is-visible {
  opacity: 1;
}

.booking-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.booking-modal__card {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #FFFFFF;
  border-radius: 14px;
  padding: 40px 48px 48px;
  box-shadow: 0 20px 60px rgba(3, 73, 75, 0.18);
  text-align: center;
  transform: translateY(8px);
  transition: transform 180ms ease-out;
}

.booking-modal.is-visible .booking-modal__card {
  transform: translateY(0);
}

.booking-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid #D9D9D9;
  border-radius: 8px;
  color: #0E2A2E;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.booking-modal__close:hover {
  background: #F5F5F5;
}

.booking-modal__title {
  margin: 0 0 28px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: #0E2A2E;
}

.booking-modal__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F99522 0%, #FEE478 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.booking-modal__date {
  margin: 0 0 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #0E2A2E;
  line-height: 1.2;
}

.booking-modal__time {
  margin: 0 0 36px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: #0E2A2E;
  line-height: 1.2;
}

.booking-modal__thanks {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #0E2A2E;
  line-height: 1.6;
}

@media (max-width: 520px) {
  .booking-modal__card {
    padding: 32px 24px 36px;
  }
  .booking-modal__title {
    font-size: 18px;
    margin-bottom: 24px;
  }
  .booking-modal__icon {
    width: 64px;
    height: 64px;
    margin-bottom: 28px;
  }
  .booking-modal__date {
    font-size: 19px;
  }
  .booking-modal__time {
    font-size: 17px;
    margin-bottom: 28px;
  }
  .booking-modal__thanks {
    font-size: 15px;
  }
}

.booking-error {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #FDECEA;
  border: 1px solid #E6C4C0;
  color: #9B2C2C;
  font-size: 14px;
  text-align: center;
}
