/**
 * حصتك — Teacher profile layout only.
 * Visual language = mycourses.css (homepage mc-*).
 */

/* —— Profile hero: contained photo (no homepage bleed overflow) —— */
.mc-body--teacher-profile .mc-tp-hero {
  position: relative;
  z-index: 1;
  overflow: clip;
  padding-block: clamp(1.5rem, 4vw, 2.75rem) clamp(2.25rem, 5vw, 3.25rem);
  isolation: isolate;
}
.mc-tp-hero__grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 960px) {
  .mc-tp-hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 340px);
    gap: 2rem;
    align-items: start;
  }
}
.mc-tp-hero__copy .mc-hero__title {
  max-width: none;
}
.mc-tp-hero__pills {
  margin: 0 0 1rem;
}
.mc-tp-hero__media {
  margin: 0;
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  max-height: 340px;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--mc-surface-2, #f4f6f9);
  box-shadow: 0 10px 28px rgba(21, 42, 74, 0.1);
  border: 1px solid color-mix(in srgb, var(--mc-navy, #1e4e8c) 10%, transparent);
  justify-self: center;
}
@media (min-width: 960px) {
  .mc-tp-hero__media {
    max-width: 340px;
    max-height: 340px;
    justify-self: end;
  }
  [dir="rtl"] .mc-tp-hero__media {
    justify-self: start;
  }
}
.mc-tp-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 0;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
.mc-tp-hero__media .mc-tp-photo-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 800;
  color: var(--mc-navy-deep);
  background:
    radial-gradient(ellipse 70% 60% at 70% 20%, color-mix(in srgb, var(--mc-secondary) 28%, white), transparent 55%),
    linear-gradient(145deg, var(--mc-navy-soft), color-mix(in srgb, var(--mc-primary) 18%, white));
}

/* Trust strip sits fully below hero — no photo bleed */
.mc-body--teacher-profile .mc-trust {
  position: relative;
  z-index: 2;
  margin-top: 0;
  clear: both;
  background: color-mix(in srgb, var(--mc-navy, #1e4e8c) 4%, white);
  border-block: 1px solid var(--mc-line, rgba(15, 23, 42, 0.08));
}
.mc-body--teacher-profile .mc-trust__list {
  position: relative;
  z-index: 1;
  align-items: stretch;
}
@media (min-width: 768px) {
  .mc-body--teacher-profile .mc-trust__list {
    grid-template-columns: repeat(var(--mc-tp-trust-cols, 4), minmax(0, 1fr));
  }
}
.mc-body--teacher-profile .mc-trust__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 5rem;
  padding-block: 0.65rem;
  padding-inline: 0.75rem;
}
.mc-body--teacher-profile .mc-trust__num {
  min-height: 1.85rem;
  line-height: 1.2;
}
.mc-body--teacher-profile .mc-trust__label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: 2.8em;
  max-width: 12.5rem;
  margin: 0 auto;
}
.mc-body--teacher-profile .mc-section {
  position: relative;
  z-index: 2;
}
@media (max-width: 959px) {
  .mc-tp-hero__media {
    order: -1;
    max-width: 260px;
    max-height: 260px;
  }
  .mc-tp-hero__grid {
    justify-items: center;
    text-align: center;
  }
  .mc-tp-hero__copy .mc-hero__actions {
    justify-content: center;
  }
  .mc-tp-hero__pills {
    justify-content: center;
  }
}

.mc-tp-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--mc-black-60);
}
.mc-tp-crumb a { color: var(--mc-primary-80); }
.mc-tp-crumb a:hover { color: var(--mc-primary-100); }
.mc-tp-crumb span[aria-hidden] { opacity: 0.45; }

.mc-tp-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 992px) {
  .mc-tp-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 360px);
    gap: 1.75rem;
  }
}
.mc-tp-main { min-width: 0; }
.mc-tp-block { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--mc-line); }
.mc-tp-sub {
  margin: 0.35rem 0 1rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--mc-ink);
}
.mc-tp-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
  font-weight: 500;
  color: var(--mc-ink-soft);
  white-space: pre-line;
}
.mc-tp-text--muted { color: var(--mc-black-60); font-size: 0.92rem; }

.mc-tp-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.mc-tp-list li {
  display: flex;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--mc-radius);
  background: var(--mc-surface-2);
  border: 1px solid var(--mc-line);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.65;
  color: var(--mc-ink-soft);
}
.mc-tp-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mc-secondary);
  margin-top: 0.45rem;
  flex-shrink: 0;
}

.mc-tp-aside {
  position: relative;
  z-index: 3;
  overflow: visible;
}
@media (min-width: 992px) {
  .mc-tp-aside { position: sticky; top: calc(var(--mc-nav-h, 72px) + 1rem); }
}
/* Badge in normal flow — never clipped by border-radius / overflow */
.mc-tp-book.mc-package {
  display: grid;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
  overflow: visible;
  padding: 1.25rem 1.35rem 1.4rem;
}
.mc-tp-book .mc-package__badge {
  position: static;
  inset: auto;
  top: auto;
  justify-self: start;
  width: max-content;
  max-width: 100%;
  margin: 0;
  z-index: auto;
  line-height: 1.2;
}
.mc-tp-book > h3 {
  margin: 0;
  padding: 0;
  line-height: 1.35;
}
.mc-tp-actions {
  display: grid;
  gap: 0.5rem;
}
.mc-tp-actions .mc-btn,
.mc-tp-form .mc-btn {
  width: 100%;
  justify-content: center;
}

.mc-tp-alert {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: var(--mc-radius);
  background: var(--mc-secondary-soft);
  border: 1px solid color-mix(in srgb, var(--mc-secondary) 35%, white);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.65;
  color: #7a5a00;
}
.mc-tp-alert.is-ok {
  background: color-mix(in srgb, var(--mc-success) 12%, white);
  border-color: color-mix(in srgb, var(--mc-success) 35%, white);
  color: #065f46;
}
.mc-tp-alert.is-err {
  background: color-mix(in srgb, var(--mc-error) 10%, white);
  border-color: color-mix(in srgb, var(--mc-error) 30%, white);
  color: #991b1b;
}

.mc-tp-free {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border-radius: var(--mc-radius);
  border: 1.5px solid color-mix(in srgb, var(--mc-secondary) 45%, white);
  background: color-mix(in srgb, var(--mc-secondary-soft) 70%, white);
}
.mc-tp-free__head h4 {
  margin: 0.35rem 0 0.25rem;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--mc-ink);
}
.mc-tp-free__head p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--mc-black-60);
  font-weight: 600;
}
.mc-tp-free__form {
  display: grid;
  gap: 0.65rem;
}
.mc-tp-free .mc-btn { width: 100%; justify-content: center; }
.mc-tp-paid {
  display: grid;
  gap: 0.65rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--mc-line);
}
.mc-tp-paid__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--mc-primary-100);
}

.mc-tp-cal { display: grid; gap: 0.55rem; }
.mc-tp-cal__day {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.55rem;
  align-items: start;
  padding: 0.55rem 0.65rem;
  border-radius: var(--mc-radius);
  background: var(--mc-surface-2);
  border: 1px solid var(--mc-line);
}
@media (max-width: 420px) {
  .mc-tp-cal__day { grid-template-columns: 1fr; }
}
.mc-tp-cal__label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--mc-primary-100);
}
.mc-tp-cal__times { display: flex; flex-wrap: wrap; gap: 5px; }
.mc-tp-cal__times span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--mc-line);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--mc-ink-soft);
}

.mc-tp-form { display: grid; gap: 0.75rem; }
.mc-tp-style { display: grid; gap: 0.5rem; }
.mc-tp-choice {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  border: 1.5px solid var(--mc-line);
  border-radius: var(--mc-radius);
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  background: var(--mc-surface-2);
}
.mc-tp-choice input { margin-top: 0.15rem; accent-color: var(--mc-primary); }
.mc-tp-choice:has(input:checked),
.mc-tp-choice:focus-within {
  border-color: var(--mc-primary);
  background: color-mix(in srgb, var(--mc-primary) 8%, white);
}
.mc-tp-choice strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--mc-ink);
}
.mc-tp-choice small {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--mc-black-60);
}
.mc-tp-fields { display: grid; gap: 0.55rem; }
.mc-tp-fields[hidden],
.mc-tp-book-pane[hidden] { display: none !important; }
.mc-tp-book-pane { display: grid; gap: 0.55rem; }
.mc-tp-field {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--mc-primary-100);
}
.mc-tp-field select {
  width: 100%;
  margin-top: 0.3rem;
  height: 42px;
  border-radius: var(--mc-radius);
  border: 1.5px solid var(--mc-line);
  padding: 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--mc-ink);
  background: #fff;
  font-family: inherit;
}
.mc-tp-slots {
  display: grid;
  gap: 0.45rem;
  max-height: 280px;
  overflow: auto;
}
.mc-tp-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: start;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--mc-line);
  background: var(--mc-surface-2);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mc-ink);
  cursor: pointer;
  font-family: inherit;
}
.mc-tp-slot input { margin: 0; accent-color: var(--mc-primary); }
.mc-tp-slot i { color: var(--mc-primary); }
.mc-tp-slot:hover {
  border-color: var(--mc-primary);
  background: color-mix(in srgb, var(--mc-primary) 8%, white);
}

.mc-tp-modal[hidden] { display: none !important; }
.mc-tp-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.mc-tp-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 42, 74, 0.62);
}
.mc-tp-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
  border-radius: var(--mc-radius-xl);
  overflow: hidden;
  background: var(--mc-navy-deep);
  box-shadow: var(--mc-shadow-lg);
}
.mc-tp-modal__close {
  position: absolute;
  top: 0.65rem;
  inset-inline-end: 0.65rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.mc-tp-video {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0b1220;
}
.mc-tp-video iframe,
.mc-tp-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Tutor apply (shared sheet consumers) */
.ta-page { background: var(--mc-surface-2, #f4f6f9); }
.ta-wrap { max-width: 760px; margin: 0 auto; padding: 1.25rem 1.15rem 3.5rem; }
.ta-chip {
  display: inline-block;
  background: color-mix(in srgb, var(--mc-navy, #1e4e8c) 10%, white);
  color: var(--mc-navy, #1e4e8c);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.ta-title {
  margin: 0 0 0.65rem;
  font-weight: 900;
  font-size: clamp(1.45rem, 3.5vw, 2rem);
  color: var(--mc-ink, #152a4a);
  line-height: 1.3;
}
.ta-sub { margin: 0 0 1.25rem; color: var(--mc-black-60, #5a6472); font-weight: 600; font-size: 0.92rem; line-height: 1.8; }
.ta-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
}
.ta-card h2 { margin: 0 0 0.85rem; font-weight: 900; font-size: 1.05rem; color: var(--mc-ink, #152a4a); }
.ta-grid { display: grid; gap: 0.85rem; }
@media (min-width: 640px) { .ta-grid--2 { grid-template-columns: 1fr 1fr; } }
.ta-field label { display: block; margin-bottom: 0.35rem; font-weight: 800; font-size: 0.78rem; color: #334155; }
.ta-field label .req { color: #dc2626; }
.ta-field input,
.ta-field select,
.ta-field textarea {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: #0b1220;
  background: #fff;
  font-family: inherit;
}
.ta-field textarea { min-height: 110px; resize: vertical; }
.ta-hint { margin: 0.35rem 0 0; font-weight: 600; font-size: 0.72rem; color: #8a94a6; }
.ta-err { margin: 0.3rem 0 0; color: #dc2626; font-weight: 700; font-size: 0.75rem; }
.ta-note {
  background: #fff8e6;
  border: 1px solid #f5d98a;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1.7;
  color: #7a5a00;
}
.ta-ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #065f46;
}
