/* LetsFit Workout Pages (Plugin) */

/* Remove padding from main container for workout intro page */
#main:has(.lf-workout-intro),
body:has(.lf-workout-intro) #main {
  padding: 0 !important;
}

/* Remove padding from main container for workout player page */
#main:has(.lfp-root),
body:has(.lfp-root) #main,
body.lfp-player-fullscreen #main {
  padding: 0 !important;
}

/* Fallback for browsers without :has() support */
.lf-workout-intro {
  background: #ffffff;
  padding: 0;
}

.lf-workout-intro {
  background: #ffffff;
  padding: 0;
}

.lf-shell {
  max-width: 768px;
  margin: 0 auto;
  background: #fff;
  border-radius: 0px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .08);
}

.lf-hero {
  position: relative;
  min-height: 280px;
  background-size: cover;
  background-position: center;
  background-color: #111827;
  display: flex;
  align-items: flex-end;
  padding: 0;
}

.lf-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .70));
  z-index: 1;
}

/* اکشن‌های گوشه چپ بالا: لایک در چپ‌ترین موقعیت، نشان دسترسی سمت راست آن */
.lf-hero__actions {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
  z-index: 2;
}

.lf-hero__badge,
.lf-hero__like {
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, .70);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
}

.lf-hero__badge {
  color: #fff;
}

.lf-hero__badge svg {
  width: 20px;
  height: 20px;
}

.lf-hero__badge--plan {
  color: #FDB431;
}

.lf-hero__badge--to-buy-workouts {
  color: #FFF;
}

.lf-hero__badge--personalized {
  color: #fff;
}

.lf-hero__like {
  padding: 0;
  border: 0;
  appearance: none;
  color: #fff;
  cursor: pointer;
  transition: color .2s ease, transform .2s ease;
}

.lf-hero__like.is-liked {
  color: #FF003C;
}

.lf-hero__like:hover {
  transform: scale(1.05);
}

.lf-hero__like:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.lf-hero__like:disabled {
  cursor: wait;
}

.lf-hero__like-heart {
  display: block;
  width: 20px;
  height: 20px;
}

.lf-hero__like-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, .3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: lf-workout-like-spin .7s linear infinite;
}

.lf-hero__like.is-loading .lf-hero__like-heart {
  display: none;
}

.lf-hero__like.is-loading .lf-hero__like-spinner {
  display: block;
}

@keyframes lf-workout-like-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .lf-hero__like-spinner { animation-duration: 1.4s; }
}

.lf-hero__content {
  position: relative;
  z-index: 2;
  padding: 16px 18px 20px;
  width: 100%;
}

.lf-hero__title {
  color: #fff;
  margin: 0 0 22px;
  font-size: 24px;
  font-weight: 900;
}

.lf-hero__subtitle {
  color: rgba(255, 255, 255, .85);
  font-size: 14px;
  margin: 0 0 12px;
  line-height: 1.6;
}

.lf-hero__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lf-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 100;
}

.lf-hero__tag svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

.lf-content {
  padding: 18px 18px 24px;
}

/* Unified access message card inside workout pages */
.lf-access-card {
  margin: 0 0 16px;
  background-color: #ffffff;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
}

.lf-ex-section-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
}

.lf-ex-lock {
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: #7c3aed;
}

.lf-ex-lock svg {
  width: 22px;
  height: 22px;
}

.lf-access-message {
  font-size: 0.85rem;
  line-height: 1.9;
  color: #374151;
  margin: 0 0 12px;
  text-align: center;
}

.lf-access-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.lf-ex-pill {
  display: inline-block;
  background-color: #f5f3ff;
  color: #6d28d9;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem !important;
}

.lf-title {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 900;
  color: #111827;
}

.lf-subtitle {
  margin: 0 0 14px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.7;
}

.lf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px;
}

.lf-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f5f3ff;
  color: #6d28d9;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.lf-desc {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.9;
  margin: 0 0 22px;
}

.lf-section-title {
  margin: 0 0 12px;
  font-size: 18px !important;
  font-weight: 900;
  color: #111827;
}

.lf-session-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lf-session-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  text-decoration: none;
  transition: all .2s ease;
}

.lf-session-card:hover {
  border-color: #ddd6fe;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

.lf-session-card__thumb {
  width: 78px;
  height: 78px;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  flex: 0 0 auto;
}

.lf-session-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lf-session-card__ph {
  width: 100%;
  height: 100%;
  background: #e5e7eb;
}

.lf-session-card__body {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.lf-session-card__name {
  font-size: 16px;
  font-weight: 900;
  color: #111827;
  margin-bottom: 6px;
}

.lf-session-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: 13px;
}

.lf-dot {
  opacity: .7;
}

.lf-session-card__chev {
  color: #6d28d9;
  font-size: 46px;
  font-weight: 100;
  flex: 0 0 auto;
  padding-right: 0;
  padding-left: 20px;
}

.lf-empty {
  color: #6b7280;
  padding: 10px 0;
}

/* Session page - Fullscreen mode */
body.lf-session-fullscreen,
body.lf-session-fullscreen #page,
body.lf-session-fullscreen #main,
body.lf-session-fullscreen #content {
  margin: 0;
  padding: 0;
}

.lf-session-page {
  background: #fff;
  padding: 0 0 100px;
  min-height: 100vh;
  margin: 0;
}

.lf-session-shell {
  max-width: 768px;
  margin: 0 auto;
  background: #fff;
  border-radius: 0px;
  overflow: hidden;
}

.lf-session-header {
  position: relative;
  min-height: 240px;
  background-size: cover;
  background-position: center;
  background-color: #111827;
}

.lf-session-header__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .70));
}

.lf-session-header__top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
}

.lf-back {
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  opacity: .95;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.lf-back:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.lf-back svg {
  display: block;
  width: 24px;
  height: 24px;
}

.lf-session-chip {
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
}

.lf-session-header__content {
  position: relative;
  z-index: 2;
  padding: 0 16px 16px;
}

.lf-session-parent {
  color: rgba(255, 255, 255, .85);
  font-size: 12px;
  margin-top: 8px;
}

.lf-session-title {
  color: #fff;
  margin: 8px 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.lf-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lf-badge {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
}

.lf-session-body {
  padding: 14px 16px 18px;
}

.lf-session-desc {
  font-size: 13px;
  color: #334155;
  line-height: 1.7;
  margin: 6px 0 12px;
}

.lf-ex-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lf-ex-card {
  display: flex;
  gap: 12px;
  border: 1px solid #eef2ff;
  border-radius: 18px;
  padding: 10px;
  background: #fff;
}

.lf-ex-card__media {
  width: 78px;
  height: 78px;
  border-radius: 14px;
  overflow: hidden;
  flex: 0 0 auto;
  background: #e5e7eb;
}

.lf-ex-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lf-ex-card__ph {
  width: 100%;
  height: 100%;
  background: #e5e7eb;
}

.lf-ex-card__content {
  flex: 1;
  min-width: 0;
}

.lf-ex-card__fa {
  font-weight: 900;
  color: #0f172a;
}

.lf-ex-card__en {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.lf-ex-card__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.lf-meta-pill {
  font-size: 12px;
  color: #0f172a;
  background: #f1f5f9;
  padding: 5px 10px;
  border-radius: 999px;
}

.lf-ex-card__note {
  margin-top: 8px;
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  border-radius: 12px;
  padding: 8px 10px;
}

.lf-session-nav {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.lf-navbtn {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 12px 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-weight: 900;
  background: #fff;
}

.lf-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  margin-top: 0;
  padding: 18px 16px;
  background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.95) 60%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.lf-cta__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  text-decoration: none;
  padding: 14px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7f23ff 0%, #b56bff 100%) !important;
  color: #fff;
  font-weight: 900;
  pointer-events: auto;
  max-width: 80%;
  margin: 20px auto;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.lf-cta__btn:hover {
  color: #fff;
}

.lf-cta__btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

/* =====================================
   Player (CSS version - no Tailwind)
   Matches Responsive Workout Player Page
===================================== */

.lfp-root {
  min-height: 100vh;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  direction: rtl;
}

/* Header */
.lfp-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.lfp-header__inner {
  max-width: 1024px;
  margin: 0 auto;
  width: 100%;
}

.lfp-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.lfp-header__count {
  padding: 6px 12px;
  background: #eff6ff;
  border-radius: 999px;
}

.lfp-header__count span {
  color: #1d4ed8;
  font-weight: 600;
}

.lfp-header__title {
  flex: 1;
  margin: 0 16px;
  text-align: center;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 16px;
  font-weight: 700;
}

.lfp-header__back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  text-decoration: none;
  color: #374151;
}

.lfp-header__back:hover {
  background: #f3f4f6;
}

.lfp-ico {
  width: 20px;
  height: 20px;
  transform: rotate(180deg);
}

.lfp-header__progress {
  height: 4px;
  background: #f3f4f6;
  direction: ltr;
  /* Force LTR for progress bar to fill from left to right */
}

.lfp-header__progressbar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #8b5cf6);
  transition: width .3s ease;
  margin-right: auto;
  /* Ensure it starts from left */
}

/* Main container */
.lfp-main {
  flex: 1;
  padding-bottom: 240px;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

/* Media */
.lfp-media {
  width: 100%;
  padding: 16px 16px 0;
}

.lfp-media__frame {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #111827;
  aspect-ratio: 1/1;
}

.lfp-media__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lfp-media__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@media (min-width: 768px) {
  .lfp-media {
    padding-top: 24px;
  }

  .lfp-media__frame {
    aspect-ratio: 1/1;
  }
}

/* Card */
.lfp-cardwrap {
  padding: 0 16px;
  margin-top: 24px;
}

.lfp-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
}

/* Exercise name */
.lfp-name {
  text-align: center;
  margin-bottom: 14px;
}

.lfp-name__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}

.lfp-dot {
  width: 12px;
  height: 12px;
  background: #22c55e;
  border-radius: 999px;
  flex-shrink: 0;
}

.lfp-dot--beginner {
  background: #22c55e;
  /* سبز */
}

.lfp-dot--advance {
  background: #ef4444;
  /* قرمز */
}

.lfp-dot--semi-advance {
  background: #f97316;
  /* نارنجی */
}

.lfp-name h2 {
  margin: 0;
  color: #111827;
  font-size: 18px !important;
  font-weight: 800 !important;
}

.lfp-name p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

/* Metrics */
.lfp-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lfp-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
}

.lfp-pill__ico {
  font-size: 16px;
  display: inline-block;
}

.lfp-pill__ico svg {
  width: 18px;
  height: 18px;
  display: block;
}

.lfp-pill--time {
  background: #f3f9ff;
  color: #2849d9;
}

.lfp-pill--repeat {
  background: #eef2ff;
  color: #4338ca;
}

.lfp-pill--sets {
  background: #eef2ff;
  color: #4338ca;
}

.lfp-pill--rest {
  background: #fafafa;
  color: #535353;
  font-weight: 100;
}

.lfp-pill--resting {
  background: #fef9c3;
  color: #713f12;
  border-color: #fde68a;
  padding: 12px 16px;
  border-radius: 12px;
}

.lfp-pill--sets {
  background: #eef2ff;
  color: #4338ca;
}

/* Meta chips */
.lfp-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.lfp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  background: #fafafa;
  color: #535353;
  font-weight: 100;
}

.lfp-chip svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

/* Instructions button */
.lfp-instructions {
  width: 100%;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  border: 2px solid #2563eb;
  color: #2563eb;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  font-weight: 700;
}

.lfp-instructions:hover {
  background: #eff6ff;
}

.lfp-ico-round {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lfp-ico-round svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Bottom */
.lfp-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.lfp-bottom__inner {
  max-width: 1024px;
  margin: 0 auto;
  width: 100%;
  padding: 18px 16px;
}

.lfp-timer {
  text-align: center;
  margin-bottom: 14px;
}

.lfp-timer__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #f9fafb;
  border-radius: 12px;
}

.lfp-timer__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9ca3af;
}

.lfp-timer__text {
  color: #111827;
  font-size: 16px;
  font-weight: 100;
  font-variant-numeric: normal;
}

.lfp-timer__rest {
  color: #d97706;
  font-weight: 700;
}

.lfp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.lfp-btn {
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.lfp-btn--nav {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 45px;
  font-weight: 900;
  line-height: 0;
  padding-top: 6px;
}

.lfp-btn--nav:hover {
  background: #e5e7eb;
}

.lfp-btn--main {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #8b5cf6);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lfp-btn--main svg {
  width: 24px;
  height: 24px;
  display: block;
}

.lfp-btn--main:hover {
  box-shadow: 0 18px 40px rgba(37, 99, 235, .30);
  transform: scale(1.03);
}

/* Modal */
.lfp-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

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

.lfp-modal__panel {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

@media (min-width: 768px) {
  .lfp-modal__panel {
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 520px;
  }
}

.lfp-modal__card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .25);
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lfp-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.lfp-modal__head h3 {
  margin: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 800;
}

.lfp-modal__close {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
}

.lfp-modal__close:hover {
  background: #f3f4f6;
}

.lfp-modal__body {
  padding: 18px 20px;
  overflow: auto;
}

.lfp-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lfp-steps li {
  display: flex;
  gap: 12px;
}

.lfp-steps__num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex: 0 0 auto;
}

.lfp-steps__txt {
  color: #374151;
  line-height: 1.8;
  padding-top: 3px;
}

.lfp-modal__foot {
  padding: 14px 16px;
  border-top: 1px solid #e5e7eb;
}

.lfp-modal__ok {
  width: 100%;
  border: none;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, #2563eb, #8b5cf6);
  color: #fff;
  font-weight: 800;
}

.lfp-modal__ok:hover {
  filter: brightness(.95);
}
