/*
 * Yoga Booking System - Frontend (Clean Canva) v2.0.21 FINAL (No-Conflict)
 * Scope: فقط داخل .yb-booking-system.yb-ui-canva
 * هدف: حذف کامل کانفیلیکت‌ها + راست‌چین دقیق + یکسان‌سازی دکمه‌ها + چیدمان اسلات‌ها مثل کنوا
 */

:root{
  --yb-bg: #fef7f4;
  --yb-brown: #715148;
  --yb-brown-light: #bc927e;
  --yb-brown-rgb: 113,81,72;
  --yb-light-rgb: 188,146,126;
  --yb-secondary: #8B5CF6;
  --yb-accent: #F59E0B;
  --yb-white: #ffffff;
  --yb-border: rgba(var(--yb-light-rgb),0.35);
  --yb-soft: rgba(var(--yb-light-rgb),0.19); /* 19% */
}

/* =========================
   Base wrapper
========================= */
.yb-booking-system.yb-ui-canva{
  background: var(--yb-bg) !important;
  
  /* space under sticky header */
  padding: 90px 50px 40px !important;
  box-sizing: border-box;
  color: var(--yb-brown) !important;
  font-family: 'Kalameh','KalamehWeb','Kalameh UI','IRANSans','Vazirmatn',sans-serif !important;
  font-size: 24px;
  line-height: 1.2;
  direction: rtl !important;
  text-align: right !important;
}

.yb-booking-system.yb-ui-canva,
.yb-booking-system.yb-ui-canva *{
  box-sizing: border-box;
}

/* پس‌زمینه صفحه (برای جلوگیری از قهوه‌ای شدن والدهای قالب/المنتور) */
body.yb-has-booking-canva,
body.yb-has-booking-canva #page,
body.yb-has-booking-canva #content,
body.yb-has-booking-canva .site,
body.yb-has-booking-canva .site-content,
body.yb-has-booking-canva .content-area,
body.yb-has-booking-canva .entry-content,
body.yb-has-booking-canva main,
body.yb-has-booking-canva article,
body.yb-has-booking-canva .entry-content .elementor,
body.yb-has-booking-canva .entry-content .elementor-section,
body.yb-has-booking-canva .entry-content .elementor-container,
body.yb-has-booking-canva .entry-content .elementor-widget-wrap,
body.yb-has-booking-canva .entry-content .elementor-column{
  background-color: var(--yb-bg) !important;
  background-image: none !important;
}

/* =========================
   Top row: meta 2/3 + dropdown 1/3
========================= */
.yb-booking-system.yb-ui-canva .yb-reserve-top{
  display: flex;
  gap: 16px;
  align-items: flex-end;
  background: transparent !important;
  padding: 0 !important;
  margin-top: 8px;
}

.yb-booking-system.yb-ui-canva .yb-reserve-service{
  flex: 0 0 33.333%;
  max-width: 33.333%;
  text-align: right !important;
  direction:rtl;
}

.yb-booking-system.yb-ui-canva .yb-reserve-label{
  color: var(--yb-brown);
  font-weight: 800;
  margin: 0 0 8px 0;
  font-size: 20px;
  text-align: right !important;
  direction:rtl;
}

/* Dropdown */
.yb-booking-system.yb-ui-canva .yb-service-select{
  width: 100%;
  height: 56px;
  padding: 10px 44px 10px 14px;
  border-radius: 999px;
  border: 2px solid var(--yb-border);
  background-color: var(--yb-white);
  color: var(--yb-brown);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12' viewBox='0 0 20 12'%3E%3Cpath d='M2 2l8 8 8-8' stroke='%23715148' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px 50%;
  direction: rtl;
  text-align: right;
}

/* Meta box (service info) */
.yb-booking-system.yb-ui-canva #yb-service-inline-meta,
.yb-booking-system.yb-ui-canva .yb-reserve-meta{
  flex: 1 1 66.666%;
  max-width: 66.666%;
  min-height: 56px;
  background: var(--yb-soft) !important;
  border-radius: 20px;
  padding: 10px 18px;
  color: var(--yb-brown) !important;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  direction: rtl !important;
  text-align: right !important;
  font-weight: 400;
   justify-content: flex-start !important; /* RTL => سمت راست */
  direction: rtl !important;
}

.yb-booking-system.yb-ui-canva #yb-service-inline-meta *,
.yb-booking-system.yb-ui-canva .yb-reserve-meta *{
  direction: rtl !important;
  text-align: right !important;
  font-weight: 400 !important;
}

/* =========================
   Week calendar: one row, no scroll on desktop
========================= */
.yb-booking-system.yb-ui-canva #yb-week-calendar{
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 0 12px;
  overflow: hidden; /* دسکتاپ بدون اسکرول */
}

/* Nav buttons (هفته قبل/بعد) */
.yb-booking-system.yb-ui-canva .yb-week-nav-btn{
  flex: 0 0 12%;
  height: 100px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 400;
  font-size: 20px;
   background: transparent !important;
  border: none !important;
 color: var(--yb-brown);
}

.yb-booking-system.yb-ui-canva .yb-week-nav-btn:disabled,
.yb-booking-system.yb-ui-canva .yb-week-nav-btn.is-disabled{
  opacity: .55;
  cursor: not-allowed;
}

/* Day cards */
.yb-booking-system.yb-ui-canva .yb-week-day{
  flex: 1 1 0;
  min-width: 0;
  height: 100px;
  background: var(--yb-white);
  border: 2px solid rgba(var(--yb-light-rgb),0.30);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  text-align: center;
}

.yb-booking-system.yb-ui-canva .yb-week-day .yb-day-name{
  font-size: 22px;
  font-weight: 700;
  color: var(--yb-brown);
}

.yb-booking-system.yb-ui-canva .yb-week-day .yb-day-date{
  font-size: 20px;
  font-weight: 400;
  color: var(--yb-brown);
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.yb-booking-system.yb-ui-canva .yb-week-day.selected{
  background: rgba(var(--yb-light-rgb),0.25);
  border-color: rgba(var(--yb-light-rgb),0.45);
}
.yb-booking-system.yb-ui-canva .yb-week-day.selected .yb-day-name,
.yb-booking-system.yb-ui-canva .yb-week-day.selected .yb-day-date{
  color: var(--yb-brown) !important;
}

.yb-booking-system.yb-ui-canva .yb-week-day.is-past{
  opacity: .5;
  cursor: not-allowed;
    background: transparent !important;

}

.yb-booking-system.yb-ui-canva .yb-today-badge{
  position: absolute;
  top: 3px;
  right: 8px;
  background: var(--yb-brown);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 400;
}

/* Divider */
.yb-booking-system.yb-ui-canva .yb-white-divider{
  height: 1px;
  background: rgba(255,255,255,0.95);
  border-radius: 2px;
  margin: 14px 0;
}

/* =========================
   Slots (FINAL layout)
   Right: time | Middle: teacher | Left: button
========================= */
.yb-booking-system.yb-ui-canva #yb-day-slots{ margin-top: 10px; }

.yb-booking-system.yb-ui-canva .yb-slots-list-rows{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Slot container */
.yb-booking-system.yb-ui-canva .yb-slot-item{
  display: grid !important;
  grid-template-columns: 120px 1fr 150px !important; /* time | teacher | button */
  align-items: center !important;
  gap: 14px;
  padding: 20px;
  border-radius: 22px;
  border: 2px solid var(--yb-brown-light);
  background: transparent;
  direction: rtl !important;
}

/* Selected slot background (رنگ‌ها اوکی) */
.yb-booking-system.yb-ui-canva .yb-slot-item.is-selected{
  background: rgba(var(--yb-light-rgb),0.19);
}

/* Time column (right) */
.yb-booking-system.yb-ui-canva .yb-slot-right{
  display: grid !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: right;
  direction: rtl;
}

.yb-booking-system.yb-ui-canva .yb-slot-time{
  font-size: 22px;
  font-weight: 700;
  color: var(--yb-brown);
  line-height: 1.2;
}

.yb-booking-system.yb-ui-canva .yb-slot-duration{
  font-size: 13px;
  font-weight: 400;
  color: rgba(var(--yb-brown-rgb),0.85);
  line-height: 1.2;
}

/* Teacher column (middle) */
.yb-booking-system.yb-ui-canva .yb-slot-teacher{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 40px;
  direction: rtl;
  text-align: right;
    line-height: 1.2;

}

.yb-booking-system.yb-ui-canva .yb-slot-avatar{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 44px;
  background: rgba(var(--yb-brown-rgb),0.12);
  display:flex;
  align-items:center;
  justify-content:center;
    line-height: 1.2;

}
.yb-booking-system.yb-ui-canva .yb-slot-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yb-booking-system.yb-ui-canva .yb-slot-teacher-name{
  font-size: 16px;
  font-weight: 600;
  color: var(--yb-brown);
  line-height: 1.2;
  text-align: right;
}
.yb-booking-system.yb-ui-canva .yb-slot-service-name{
  font-size: 13px;
  font-weight: 400;
  color: rgba(var(--yb-brown-rgb),0.85);
  line-height: 1.2;
  text-align: right;
}

.yb-booking-system.yb-ui-canva .yb-slot-sub-teacher{
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(var(--yb-brown-rgb),0.78);
  text-align: right;
}
.yb-booking-system.yb-ui-canva .yb-sub-badge{
  font-weight: 700;
  font-size: 12px;
  color: rgba(var(--yb-brown-rgb),0.75);
}

/* Button column (left) */
.yb-booking-system.yb-ui-canva .yb-slot-left{
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: flex-end;
  direction: ltr; /* قیمت سمت چپ دکمه */
}

.yb-slot-price{
  font-weight: 900;
  font-size: 16px;
  color: var(--yb-brown);
  white-space: nowrap;
}

/* Unify ALL button states (رزرو و انتخاب شد) */
.yb-booking-system.yb-ui-canva .yb-slot-left button,
.yb-booking-system.yb-ui-canva .yb-slot-left a,
.yb-booking-system.yb-ui-canva .yb-slot-btn,
.yb-booking-system.yb-ui-canva .yb-slot-btn.is-selected,
.yb-booking-system.yb-ui-canva .yb-slot-btn.yb-selected-badge,
.yb-booking-system.yb-ui-canva .yb-selected-badge,
.yb-booking-system.yb-ui-canva .yb-slot-action{
  width: 140px !important;
  min-width: 140px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 10px 16px !important;
  border-radius: 18px !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

/* Default (رزرو) */
.yb-booking-system.yb-ui-canva .yb-slot-btn,
.yb-booking-system.yb-ui-canva .yb-slot-action{
  background: var(--yb-brown-light) !important;
  border: 2px solid var(--yb-brown-light) !important;
  color: #ffffff !important;
}

/* Selected (انتخاب شد) */
.yb-booking-system.yb-ui-canva .yb-slot-btn.is-selected,
.yb-booking-system.yb-ui-canva .yb-slot-btn.yb-selected-badge,
.yb-booking-system.yb-ui-canva .yb-selected-badge{
  background: #ffffff !important;
  border: 2px solid #ffffff !important;
  color: var(--yb-brown) !important;
}

.yb-booking-system.yb-ui-canva .yb-slot-btn:disabled,
.yb-booking-system.yb-ui-canva .yb-slot-action.full{
  opacity: .55 !important;
  cursor: not-allowed !important;
}

/* راست‌چین قطعی متن‌های داخل اسلات */
.yb-booking-system.yb-ui-canva .yb-slot-item *{
  direction: rtl !important;
  text-align: right !important;
}

/* =========================
   Cart bar
========================= */
.yb-booking-system.yb-ui-canva .yb-cart-bar{
  margin-top: 14px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  padding: 0;
}

.yb-booking-system.yb-ui-canva .yb-cart-summary{
  flex: 1;
  background: var(--yb-soft);
  border-radius: 22px;
    font-size: 20px;

  padding: 12px 18px;
  color: var(--yb-brown);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 400;
  direction: rtl !important;
  text-align: right !important;
   justify-content: flex-start !important; /* RTL => سمت راست */
  
}

.yb-booking-system.yb-ui-canva .yb-cart-summary *{
  direction: rtl !important;
  text-align: right !important;
}

.yb-booking-system.yb-ui-canva .yb-cart-summary .yb-cart-dot{ display:none; }

.yb-booking-system.yb-ui-canva .yb-cart-total,
.yb-booking-system.yb-ui-canva .yb-cart-currency{
  font-size: 16px;
  font-weight: 400;
}

/* Checkout/pay button */
.yb-booking-system.yb-ui-canva .yb-checkout-btn{
  height: 48px;
  border-radius: 18px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 20px;
  background: var(--yb-white);
  color: var(--yb-brown);
  border: 2px solid rgba(var(--yb-light-rgb),0.30);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  direction: rtl;
  width: 180px !important;   /* عدد را بزرگ/کوچک کن */
  min-width: 180px !important;
}

/* =========================
   States: loading/empty/error
========================= */
.yb-booking-system.yb-ui-canva .yb-loading{
  min-height: 120px;
  position: relative;
}
.yb-booking-system.yb-ui-canva .yb-loading:after{
  content:'';
  position:absolute;
  top:50%; left:50%;
  width: 40px; height: 40px;
  border: 3px solid rgba(var(--yb-light-rgb),0.25);
  border-top-color: var(--yb-brown-light);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  animation: ybspin 1s linear infinite;
}
@keyframes ybspin{ to{ transform: translate(-50%,-50%) rotate(360deg);} }

.yb-booking-system.yb-ui-canva .yb-empty-state,
.yb-booking-system.yb-ui-canva .yb-no-slots,
.yb-booking-system.yb-ui-canva .yb-error-message{
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(var(--yb-light-rgb),0.22);
  border-radius: 16px;
  padding: 16px;
  color: var(--yb-brown);
  text-align: right;
  direction: rtl;
}

/* =========================
   Responsive (mobile): allow week scroll
========================= */
@media (max-width: 980px){
  .yb-booking-system.yb-ui-canva{
    padding: 24px 18px !important;
  }

  .yb-booking-system.yb-ui-canva .yb-reserve-top{
    flex-direction: column;
    align-items: stretch;
  }
  .yb-booking-system.yb-ui-canva .yb-reserve-service,
  .yb-booking-system.yb-ui-canva #yb-service-inline-meta,
  .yb-booking-system.yb-ui-canva .yb-reserve-meta{
    max-width: 100%;
    flex: 1 1 auto;
  }

  /* موبایل: تقویم یک‌ردیفه با اسکرول افقی، ولی جمع‌وجورتر (کل عرض کمتر = اسکرول کمتر) */
  .yb-booking-system.yb-ui-canva #yb-week-calendar{
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
    gap: 6px !important;
  }
  .yb-booking-system.yb-ui-canva .yb-week-nav-btn{
    flex: 0 0 46px !important;
    min-width: 46px !important;
    height: 68px !important;
    font-size: 12px !important;
  }
  .yb-booking-system.yb-ui-canva .yb-week-day{
    flex: 0 0 78px !important;
    min-width: 78px !important;
    height: 68px;
  }

  /* اسلات‌ها: در موبایل ستونی */
  .yb-booking-system.yb-ui-canva .yb-slot-item{
    grid-template-columns: 1fr !important;
  }
  .yb-booking-system.yb-ui-canva .yb-slot-left{
    justify-content: flex-end;
  }
}
/* --- Force RTL for service meta text --- */
.yb-booking-system.yb-ui-canva #yb-service-inline-meta,
.yb-booking-system.yb-ui-canva #yb-service-inline-meta *{
  direction: rtl !important;
  text-align: right !important;
  font-size:20px;
  unicode-bidi: plaintext;
}

/* --- Force RTL for selected count/summary text --- */
.yb-booking-system.yb-ui-canva .yb-cart-summary,
.yb-booking-system.yb-ui-canva .yb-cart-summary *{
  direction: rtl !important;
  text-align: right !important;
  unicode-bidi: plaintext;
}

/* --- Fix slot inner alignment (name/job + avatar) --- */
.yb-booking-system.yb-ui-canva .yb-slot-mid,
.yb-booking-system.yb-ui-canva .yb-slot-mid *{
  direction: rtl !important;
  text-align: right !important;
}
.yb-booking-system.yb-ui-canva .yb-slot-teacher-info{
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  text-align: right !important;
}

/* =============================
 * Checkout (مرحله بررسی رزروها)
 * ============================= */
.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-header{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 18px;
   text-align: right !important;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-title{
  font-size: 26px;
  font-weight: 800;
  color: var(--yb-brown);
    justify-content: flex-end;

     text-align: right !important;

}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-slots{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-slot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 2px solid var(--yb-brown-light);
  background: rgba(255,255,255,0.38);
  direction: rtl;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-time{
  width: 120px;
  flex: 0 0 120px;
  text-align: right;
  display: grid;
  flex-direction: column;
  gap: 6px;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-date{
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-clock{
  font-size: 16px;
  font-weight: 400;
  opacity: .9;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-teacher{
  flex: 1 1 auto;
  display: flex;
  align-items: right;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-teacher .yb-slot-teacher-info{
  min-width: 0;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-price{
  width: 120px;
  flex: 0 0 120px;
  text-align: right;
  font-size: 22px;
  font-weight: 700;
    justify-content: flex-start;
      line-height: 1.7;


}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-remove{
  width: 110px;
  flex: 0 0 110px;
  height: 48px;
  border-radius: 18px;
  border: 2px solid rgba(var(--yb-light-rgb),0.35);
  background: var(--yb-white);
  color: var(--yb-brown);
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-remove:disabled{
  opacity: .55;
  cursor: not-allowed;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-footer{
  margin-top: 18px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  direction: rtl;
  text-align: right;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-total{
  background: var(--yb-soft);
  border-radius: 22px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  direction: rtl;
  text-align: right;
  font-size: 18px;
  font-weight: 700;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-total-val{
  white-space: nowrap;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-buttons{
  display: flex;
  gap: 12px;
  flex-direction: row-reverse; /* پرداخت سمت چپ (مثل ووکامرس) */
  direction: rtl;
}

/* موبایل */
@media (max-width: 640px){
  .yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-footer{
    flex-direction: column;
    align-items: stretch;
  }
  .yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-buttons{
    width: 100%;
    justify-content: space-between;
  }
  .yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-btn{
    width: 48% !important;
    min-width: 0 !important;
  }
}


.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-actions .yb-checkout-btn{
  width: 160px;
  height: 48px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 400;
  text-decoration: none;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-pay{
  background: var(--yb-brown-light);
  border: 2px solid var(--yb-brown-light);
  color: #fff;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-prev{
  background: var(--yb-white);
  border: 2px solid rgba(var(--yb-light-rgb),0.30);
  color: var(--yb-brown);
}

@media (max-width: 980px){
  .yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-slot{
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-time,
  .yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-price,
  .yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-remove{
    width: auto;
    flex: 0 0 auto;
  }
  .yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-footer{
  margin-top: 18px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  direction: rtl;
  text-align: right;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-total{
  background: var(--yb-soft);
  border-radius: 22px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  direction: rtl;
  text-align: right;
  font-size: 18px;
  font-weight: 700;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-total-val{
  white-space: nowrap;
}

.yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-buttons{
  display: flex;
  gap: 12px;
  flex-direction: row-reverse; /* پرداخت سمت چپ (مثل ووکامرس) */
  direction: rtl;
}

/* موبایل */
@media (max-width: 640px){
  .yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-footer{
    flex-direction: column;
    align-items: stretch;
  }
  .yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-buttons{
    width: 100%;
    justify-content: space-between;
  }
  .yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-btn{
    width: 48% !important;
    min-width: 0 !important;
  }
}

  .yb-booking-system.yb-ui-canva.yb-checkout .yb-checkout-actions .yb-checkout-btn{
    flex: 1;
    width: auto;
  }
}



/* =========================
   WooCommerce My Account sizing
========================= */
.woocommerce-account .yb-booking-system.yb-ui-canva.yb-ui-account{
  font-size: 16px !important;
  line-height: 1.65 !important;
  padding: 22px 26px !important;
}
.woocommerce-account .yb-booking-system.yb-ui-canva.yb-ui-account h3{
  font-size: 20px !important;
}
.woocommerce-account .yb-booking-system.yb-ui-canva.yb-ui-account .yb-btn,
.woocommerce-account .yb-booking-system.yb-ui-canva.yb-ui-account button{
  font-size: 16px !important;
}


/* v2.0.20.6 UI fixes */
.yb-checkout-header,
.yb-checkout-header h2,
.yb-checkout-title {
  width: 100% !important;
  text-align: right !important;
  direction: rtl;
}

.yb-slot-left,
.yb-slot-price {
  direction: ltr;
}

.yb-slot-price {
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  margin: 0 12px;
}

.yb-slot-coach-info,
.yb-slot-service {
  text-align: right;
  direction: rtl;
}



/* --- v2.0.20.7 UI fixes --- */
.yb-booking-system.yb-ui-canva .yb-slot-teacher-info{
  text-align: right !important;
  direction: rtl !important;
}
.yb-booking-system.yb-ui-canva .yb-slot-service-name{
  text-align: right !important;
  direction: rtl !important;
}

/* قیمت در صفحه رزرو مثل صفحه بررسی (بولد و خوانا) */
.yb-booking-system.yb-ui-canva .yb-slot-price{
  font-weight: 800 !important;
  font-size: 16px !important;
  white-space: nowrap;
}

/* جلوگیری از رفتن زیر منو/هدر قالب */
.yb-booking-system.yb-ui-canva .yb-booking-panel,
.yb-booking-system.yb-ui-canva .yb-checkout-panel{
  scroll-margin-top: 90px;
}


/* تیتر بررسی رزروها همیشه سمت راست */
.yb-booking-system.yb-ui-canva .yb-checkout-header{
  justify-content: flex-end !important;
}
.yb-booking-system.yb-ui-canva .yb-checkout-title{
  text-align: right !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}


/* v2.0.20.8 fixes: align service with coach + prevent header overlap on WC pages */
.yb-slot-teacher-info, .yb-slot-teacher-info * { text-align: right !important; direction: rtl !important; }
.yb-slot-teacher-info { display:flex; flex-direction:column; align-items:flex-end; gap:2px; }
.yb-slot-service, .yb-slot-service-name { text-align:right !important; direction:rtl !important; }

/* Make sure booking UI isn't hidden under sticky headers */
.yb-booking-shell, .yb-booking-container, .yb-booking-root, .yb-booking-system { padding-top: 70px !important; }

/* WooCommerce order-pay / order-received pages often sit under sticky headers in RTL themes */
body.woocommerce-checkout.woocommerce-page .woocommerce,
body.woocommerce-order-received.woocommerce-page .woocommerce,
body.woocommerce-checkout.woocommerce-page #primary,
body.woocommerce-order-received.woocommerce-page #primary {
  padding-top: 70px !important;
}



/* yb-wc-topfix: جلوگیری از رفتن صفحه‌های پرداخت زیر منو */
body.woocommerce-checkout #page, body.woocommerce-checkout .site, body.woocommerce-checkout .site-content,
body.woocommerce-order-received #page, body.woocommerce-order-received .site, body.woocommerce-order-received .site-content{
  padding-top: 70px !important;
}


/* ===== Packages shop shortcode ===== */
.yb-packages-shop{
  /* default: 4 columns on desktop */
  --columns: 4;
  display:grid;
  grid-template-columns:repeat(var(--columns),minmax(0,1fr));
  gap:16px;
  direction:rtl;
  text-align:right;
  margin-top:16px;
}
.yb-packages-shop.yb-empty{padding:16px;border:1px solid rgba(0,0,0,.08);border-radius:16px;}
.yb-package-card{
  border:2px solid #caa58f;
  border-radius:22px;
  overflow:hidden;
  background:#fffaf7;
  box-shadow:0 1px 10px rgba(0,0,0,.04);
}
.yb-package-media img{width:100%;height:180px;object-fit:cover;display:block;}
.yb-package-body{padding:14px 14px 16px;}
.yb-package-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.yb-package-title{margin:0;font-size:18px;line-height:1.6;}
.yb-package-price{white-space:nowrap;direction:ltr;text-align:left;}
.yb-package-price strong{font-size:18px;}
.yb-package-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
.yb-package-desc p{margin:8px 0 0;}
.yb-meta-item{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px dashed rgba(0,0,0,.08);}
.yb-meta-item:last-child{border-bottom:none;}
.yb-services-title{font-weight:700;margin-bottom:6px;}
.yb-services-list{margin:0;padding:0 18px 0 0;}
.yb-services-list li{margin:4px 0;}
.yb-package-actions{margin-top:10px;display:flex;justify-content:flex-start;}
.yb-package-buy-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:14px;
  background:#9b7a67;
  color:#fff !important;
  text-decoration:none !important;
  font-weight:700;
}
.yb-package-buy-btn:hover{opacity:.92;}
@media (max-width: 1200px){
  .yb-packages-shop{--columns:3;}
}

@media (max-width: 900px){
  .yb-packages-shop{--columns:2;}
  .yb-package-grid{grid-template-columns:1fr;}
}

@media (max-width: 560px){
  .yb-packages-shop{--columns:1;}
}


/* ===== Package cards (design like sample image) ===== */
.yb-packages-shop--cards{gap:18px;}
.yb-pkg-card{
  background: var(--yb-bg);
  border-radius:28px;
  padding:18px 16px 16px;
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-decoration:none !important;
  color:#5a3b33 !important;
  /* Compact height (4 columns) but keep enough breathing room */
  min-height:320px;
  box-shadow:0 1px 10px rgba(0,0,0,.06);
  transition: transform .15s ease, box-shadow .15s ease;
}

/* Tabs for package segments (Windows-like tabs) */
.yb-packages-tabs{
  display:flex;
  gap:6px;
  align-items:flex-end;
  margin:8px 0 14px;
  padding:0;
  border-bottom:1px solid rgba(var(--yb-brown-rgb),0.22);
}
.yb-tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 18px;
  border-radius:10px 10px 0 0;
  border:1px solid rgba(var(--yb-brown-rgb),0.22);
  border-bottom:none;
  background: var(--yb-bg);
  text-decoration:none;
  color: var(--yb-brown);
  font-weight:700;
  position:relative;
  top:1px;
}
.yb-tab:hover{filter:brightness(0.99);}
.yb-tab.yb-tab--active{
  background:#fff;
  color:#3e2b26;
  border-color:rgba(var(--yb-brown-rgb),0.28);
}

/* Package card: spacing/layout */
.yb-pkg-card{min-height:320px;}
.yb-pkg-desc{margin-top:10px;font-size:14px;opacity:0.9;}
.yb-pkg-card:hover{transform:translateY(-1px);box-shadow:0 6px 20px rgba(0,0,0,.10);}

.yb-pkg-sessions{
  position:absolute;
  top:10px;
  right:16px;
  text-align:center;
  min-width:64px;
}
.yb-pkg-sessions-num{font-size:40px;font-weight:900;line-height:1;}
.yb-pkg-sessions-label{font-size:14px;font-weight:800;margin-top:4px;opacity:.9;}

.yb-pkg-name{
  /* More space from top-right sessions badge */
  margin-top:58px;
  text-align:center;
  font-size:22px;
  font-weight:900;
  line-height:1.6;
  width:100%;
}

.yb-pkg-desc{
  font-size: 14px;
  line-height: 1.7;
  opacity: .8;
  margin-top: 10px;
  text-align: center;
}
.yb-pkg-valid{
  margin-top:10px;
  text-align:center;
  font-size:14px;
  font-weight:400;
  opacity:.9;
}
.yb-pkg-valid-label{font-weight:800;}
.yb-pkg-valid-value{font-weight:400;}
.yb-pkg-price{
  margin-top:12px;
  text-align:center;
  font-size:28px;
  font-weight:900;
  line-height:1.2;
  width:100%;
}
.yb-pkg-buy-btn{
  margin-top:auto;
  margin-bottom:6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 46px;
  border-radius:999px;
  background:rgba(90,59,51,0.15);
  color:#5a3b33;
  font-weight:900;
  text-decoration:none;
}

@media (max-width: 680px){
  .yb-pkg-card{min-height:300px;}
  .yb-pkg-sessions-num{font-size:34px;}
  .yb-pkg-name{font-size:20px;}
  .yb-pkg-price{font-size:24px;}
  .yb-pkg-buy-btn{padding:10px 34px;}
}

/* ===== My Account wide tables ===== */
.woocommerce-account .yb-booking-system.yb-ui-canva.yb-ui-account .yb-table-wrap{
  width:100%;
  overflow-x: visible; /* بدون اسکرول افقی */
}
.woocommerce-account .yb-booking-system.yb-ui-canva.yb-ui-account .yb-wide-table{
  width:100%;
  min-width: 0;
  table-layout: fixed;
}
.woocommerce-account .yb-booking-system.yb-ui-canva.yb-ui-account .yb-wide-table th,
.woocommerce-account .yb-booking-system.yb-ui-canva.yb-ui-account .yb-wide-table td{
  padding: 12px 10px;
  font-size: 16px;
  white-space: normal;
  word-break: break-word;
}
.woocommerce-account .yb-booking-system.yb-ui-canva.yb-ui-account .woocommerce-orders-table__cell-order-actions{
  white-space: normal;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.woocommerce-account .yb-booking-system.yb-ui-canva.yb-ui-account .woocommerce-orders-table__cell-order-actions .button{
  border-radius: 999px;
  padding: 10px 14px;
  margin: 0;
  font-size: 14px;
}
.woocommerce-account .yb-booking-system.yb-ui-canva.yb-ui-account .woocommerce-orders-table__cell-order-actions .button.cancel{
  opacity: .9;
}


/* ===== Package detail card ===== */
.yb-pkg-detail-card{
  background:#f7dedd;
  border-radius:28px;
  padding:22px 18px 18px;
  position:relative;
  overflow:hidden;
  text-align:center;
  direction:rtl;
  color:#5a3b33;
  box-shadow:0 1px 10px rgba(0,0,0,.06);
}
.yb-pkg-detail-sessions{
  position:absolute;
  top:10px;
  right:16px;
  text-align:center;
  min-width:64px;
}
.yb-pkg-detail-num{font-size:40px;font-weight:900;line-height:1;}
.yb-pkg-detail-label{font-size:14px;font-weight:800;margin-top:4px;opacity:.9;}
.yb-pkg-detail-name{margin-top:44px;font-size:22px;font-weight:900;line-height:1.6;}
.yb-pkg-detail-valid{margin-top:2px;font-size:14px;font-weight:800;opacity:.9;}
.yb-pkg-detail-price{margin-top:10px;font-size:28px;font-weight:900;line-height:1.2;}


/* --- Packages card: layout (clean) --- */
/* Rely on HTML order; keep comfortable spacing & push buy button to bottom */
.yb-pkg-card{display:flex;flex-direction:column;min-height:320px;}
.yb-pkg-buy-btn{margin-top:auto;}

/* --- My Account tables: tighter columns so actions stay on one line --- */
.yb-ui-account .yb-wide-table th,
.yb-ui-account .yb-wide-table td{white-space:nowrap;}
.yb-ui-account .yb-wide-table td.yb-actions,
.yb-ui-account .yb-wide-table th.yb-actions{width:220px;}
.yb-ui-account .yb-wide-table td.yb-actions .yb-action-btn{display:inline-flex;align-items:center;justify-content:center;min-width:74px;}

/* =========================================================
   PATCH موبایل/تبلت — کوچیک‌سازی فونت‌ها + رفع تداخل inline --columns
   (اضافه‌شده برای رفع مشکل ریسپانسیو گزارش‌شده)
========================================================= */

/* --- تبلت / موبایل بزرگ --- */
@media (max-width: 782px){
  .yb-booking-system.yb-ui-canva{
    font-size: 16px !important;
    padding: 20px 14px !important;
  }
  .yb-booking-system.yb-ui-canva .yb-reserve-label{ font-size: 15px !important; }
  .yb-booking-system.yb-ui-canva .yb-service-select,
  .yb-booking-system.yb-ui-canva select{ font-size: 15px !important; }
  .yb-booking-system.yb-ui-canva #yb-service-inline-meta,
  .yb-booking-system.yb-ui-canva #yb-service-inline-meta *{ font-size: 13px !important; }

  /* روزهای هفته */
  .yb-booking-system.yb-ui-canva .yb-week-day{ height: 76px; min-width: 78px !important; }
  .yb-booking-system.yb-ui-canva .yb-week-day .yb-day-name{ font-size: 14px !important; }
  .yb-booking-system.yb-ui-canva .yb-week-day .yb-day-date{ font-size: 12px !important; }
  .yb-booking-system.yb-ui-canva .yb-week-nav-btn{ font-size: 13px !important; height: 76px; min-width: 46px !important; }
  .yb-booking-system.yb-ui-canva .yb-today-badge{ font-size: 9px !important; }

  /* اسلات‌ها */
  .yb-booking-system.yb-ui-canva .yb-slot-time{ font-size: 16px !important; }
  .yb-booking-system.yb-ui-canva .yb-slot-teacher-name{ font-size: 13px !important; }
  .yb-booking-system.yb-ui-canva .yb-slot-price{ font-size: 14px !important; }
  .yb-booking-system.yb-ui-canva .yb-book-btn,
  .yb-booking-system.yb-ui-canva .yb-slot-book-btn,
  .yb-booking-system.yb-ui-canva .yb-slot-left button,
  .yb-booking-system.yb-ui-canva .yb-slot-left a,
  .yb-booking-system.yb-ui-canva .yb-slot-btn,
  .yb-booking-system.yb-ui-canva .yb-slot-action{
    width: 108px !important;
    min-width: 108px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 8px 10px !important;
    font-size: 13px !important;
  }

  /* نوار سبد رزرو پایین */
  .yb-booking-system.yb-ui-canva .yb-cart-bar{
    padding: 12px 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .yb-booking-system.yb-ui-canva .yb-cart-summary{
    flex-wrap: nowrap !important;
    width: 100% !important;
    justify-content: space-between !important;
  }
  .yb-booking-system.yb-ui-canva .yb-checkout-btn{
    width: 100% !important;
    min-width: 0 !important;
  }
  .yb-booking-system.yb-ui-canva .yb-cart-label,
  .yb-booking-system.yb-ui-canva .yb-cart-total,
  .yb-booking-system.yb-ui-canva .yb-cart-currency{ font-size: 13px !important; }
  .yb-booking-system.yb-ui-canva .yb-cart-count{ font-size: 13px !important; }

  /* کارت‌های پکیج: چیدمان ستونی اجباری، مهم‌تر از inline style */
  .yb-packages-shop.yb-packages-shop--cards{ --columns: 1 !important; }
  .yb-pkg-card{ min-height: unset !important; padding: 16px 14px 14px !important; }
  .yb-pkg-name{ font-size: 17px !important; margin-top: 40px !important; }
  .yb-pkg-sessions-num{ font-size: 28px !important; }
  .yb-pkg-sessions-label{ font-size: 12px !important; }
  .yb-pkg-desc,
  .yb-pkg-valid{ font-size: 13px !important; }
  .yb-pkg-price{ font-size: 20px !important; }
  .yb-pkg-buy-btn{ font-size: 14px !important; padding: 9px 30px !important; margin-top: 22px !important; }

  .yb-pkg-detail-card{ padding: 16px 14px !important; }
  .yb-pkg-detail-num{ font-size: 28px !important; }
  .yb-pkg-detail-name{ font-size: 17px !important; margin-top: 34px !important; }
  .yb-pkg-detail-valid,
  .yb-pkg-detail-label{ font-size: 12px !important; }
  .yb-pkg-detail-price{ font-size: 20px !important; }
}

/* --- گوشی کوچک --- */
@media (max-width: 420px){
  .yb-booking-system.yb-ui-canva{ font-size: 14px !important; padding: 16px 10px !important; }
  .yb-booking-system.yb-ui-canva .yb-week-day{ height: 68px; min-width: 78px !important; }
  .yb-booking-system.yb-ui-canva .yb-week-day .yb-day-name{ font-size: 12px !important; }
  .yb-booking-system.yb-ui-canva .yb-week-day .yb-day-date{ font-size: 11px !important; }
  .yb-booking-system.yb-ui-canva .yb-week-nav-btn{ min-width: 44px !important; height: 68px; }
  .yb-pkg-name{ font-size: 15px !important; }
  .yb-pkg-price{ font-size: 18px !important; }
}

/* =========================================================
   PATCH ۲ — ساعت هم‌ردیف با نام مربی، تب‌های هم‌عرض، فاصله انتخاب خدمت از تب‌ها
========================================================= */

/* --- اسلات‌ها: ساعت داخل همان ردیف میانی (کنار مربی)، دکمه/قیمت در ردیف بعدی --- */
@media (max-width: 980px){
  .yb-booking-system.yb-ui-canva .yb-slot-item{
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    row-gap: 10px !important;
    column-gap: 12px !important;
    overflow: hidden !important;
  }
  /* ردیف میانی: مربی (چپ) + ساعت (راست) */
  .yb-booking-system.yb-ui-canva .yb-slot-item{
    direction: ltr !important;
  }
  .yb-booking-system.yb-ui-canva .yb-slot-mid{
    order: 1 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    direction: rtl !important; /* متن فارسی داخلش درست نمایش داده شود */
  }
  .yb-booking-system.yb-ui-canva .yb-slot-right{
    order: 2 !important;
    flex: 0 0 auto !important;
  }
  /* ردیف پایین: دکمه چپ (زیر نام) / قیمت راست (زیر ساعت) */
  .yb-booking-system.yb-ui-canva .yb-slot-left{
    order: 3 !important;
    flex: 0 0 100% !important;
    justify-content: space-between !important;
    direction: ltr !important;
  }
  .yb-booking-system.yb-ui-canva .yb-slot-btn{
    order: 1 !important;
    width: 108px !important;
    min-width: 108px !important;
  }
  .yb-booking-system.yb-ui-canva .yb-slot-price{ order: 2 !important; }

  /* فاصله بیشتر بین نام مربی و عکس، و بین دکمه رزرو و قیمت */
  .yb-booking-system.yb-ui-canva .yb-slot-teacher{
    gap: 28px !important;
  }
  .yb-booking-system.yb-ui-canva .yb-slot-left{
    column-gap: 28px !important;
  }
  /* حالت "انتخاب شد" هم باید همین اندازه‌ی کوچک را داشته باشد (قانون قدیمی دسکتاپ اولویت بالاتری داشت) */
  .yb-booking-system.yb-ui-canva .yb-slot-btn.is-selected,
  .yb-booking-system.yb-ui-canva .yb-slot-btn.yb-selected-badge,
  .yb-booking-system.yb-ui-canva .yb-selected-badge{
    width: 108px !important;
    min-width: 108px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 8px 10px !important;
    font-size: 13px !important;
  }

  /* اگر مربی جایگزین وجود دارد، ردیف دکمه/قیمت فاصله‌ی بیشتری از بالا بگیرد تا خوانا بماند */
  .yb-booking-system.yb-ui-canva .yb-slot-item:has(.yb-slot-sub-teacher) .yb-slot-left{
    margin-top: 10px !important;
  }
}

/* --- تب‌های خرید پکیج: عرض مساوی فقط در موبایل/تبلت --- */
@media (max-width: 782px){
  .yb-packages-tabs{ width: 100%; }
  .yb-packages-tabs .yb-tab{
    flex: 1 1 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}
@media (max-width: 480px){
  .yb-packages-tabs .yb-tab{
    font-size: 12px !important;
    padding: 9px 4px !important;
  }
}

/* انتخاب خدمت در صفحه پکیج همیشه تمام‌عرض باشد (بدون سایدبار کنارش) */
.yb-packages-filter .yb-reserve-service{
  flex: 1 1 100% !important;
  max-width: 100% !important;
}

.yb-packages-tabs + .yb-reserve-top.yb-packages-filter{
  margin-top: 26px;
}
