.ya-schedule-wrap {
  --ya-accent: var(--primary-color, #94a7ae);
  --ya-accent-hover: var(--primary-color-hover, #b8ced7);
  --ya-accent-dark: #5f7a82;
  --ya-accent-light: #eef3f5;
  --ya-accent-ll: #f6f9fa;
  --ya-head: #1a2e35;
  --ya-radius: 14px;
  --ya-font: var(--primary-font-family, 'Manrope', sans-serif);
  --ya-heading: var(--heading-color, #161616);
  --ya-body: var(--body-color, #303030);
  --ya-muted: #7a8c91;
  --ya-border: #dce6e9;
  font-family: var(--ya-font);
}

.ya-schedule-wrap .ya-schedule-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ya-heading);
  margin-bottom: 1.25rem;
}

/* ── Tabs ── */
.ya-schedule-wrap .ya-schedule-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.ya-schedule-wrap .ya-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 100px;
  border: 1px solid var(--ya-border);
  background: #fff;
  color: var(--ya-body);
  font-family: var(--ya-font);
  font-size: 16px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
  font-weight: 600;
}

.ya-schedule-wrap .ya-tab i {
  font-size: 16px;
  color: var(--ya-accent);
  transition: color 0.15s;
}

.ya-schedule-wrap .ya-tab:hover {
  border-color: var(--ya-accent);
  background: var(--ya-accent-ll);
}

.ya-schedule-wrap .ya-tab:focus-visible {
  outline: var(--btn-outline-focus, 3px solid #b8ced7);
  outline-offset: 2px;
}

.ya-schedule-wrap .ya-tab.active {
  background: var(--ya-head);
  border-color: var(--ya-head);
  color: #fff;
  font-weight: 600;
}

.ya-schedule-wrap .ya-tab.active i {
  color: #fff;
}

/* ── Dropdown ── */
.ya-schedule-wrap .ya-schedule-filters {
  display: flex;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.ya-schedule-wrap .ya-dropdown {
  position: relative;
  min-width: 240px;
  user-select: none;
}

.ya-schedule-wrap .ya-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--ya-border);
  border-radius: 100px;
  font-family: var(--ya-font);
  font-size: 16px;
  font-weight: 600;
  color: var(--ya-body);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s;
}

.ya-schedule-wrap .ya-dropdown-trigger i {
  font-size: 16px;
  color: var(--ya-accent);
  flex-shrink: 0;
}

.ya-schedule-wrap .ya-dropdown-label {
  flex: 1;
}

.ya-schedule-wrap .ya-dropdown-trigger:hover {
  border-color: var(--ya-accent);
}

.ya-schedule-wrap .ya-dropdown.open .ya-dropdown-trigger {
  border-color: var(--ya-accent);
  border-radius: 14px 14px 0 0;
}

.ya-schedule-wrap .ya-dropdown-arrow {
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--ya-accent);
  margin-left: auto;
}

.ya-schedule-wrap .ya-dropdown.open .ya-dropdown-arrow {
  transform: rotate(180deg);
}

.ya-schedule-wrap .ya-dropdown-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--ya-accent);
  border-top: none;
  border-radius: 0 0 14px 14px;
  list-style: none;
  margin: 0;
  padding: 4px 0 6px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.ya-schedule-wrap .ya-dropdown.open .ya-dropdown-list {
  display: block;
}

.ya-schedule-wrap .ya-dropdown-item {
  padding: 9px 18px;
  font-family: var(--ya-font);
  font-size: 14px;
  color: var(--ya-body);
  cursor: pointer;
  transition: background 0.1s;
}

.ya-schedule-wrap .ya-dropdown-item:hover {
  background: var(--ya-accent-ll);
}

.ya-schedule-wrap .ya-dropdown-item.selected {
  color: var(--ya-accent-dark);
  font-weight: 600;
}

/* ── Table ── */
.ya-schedule-wrap .ya-schedule-table-wrap {
  border: 1px solid var(--ya-border);
  border-radius: var(--ya-radius);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(94, 122, 130, 0.08);
}

.ya-schedule-wrap .ya-schedule-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 0;
}
.ya-schedule-wrap .ya-practice-link {
  color: var(--ya-head);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--ya-border);
  font-weight: 500;
  transition:
    color 0.15s,
    text-decoration-color 0.15s;
}
.ya-schedule-wrap .ya-practice-link:hover {
  color: var(--ya-accent-dark);
  text-decoration-color: var(--ya-accent-dark);
}
/* Thead — тъмен */
.ya-schedule-wrap .ya-schedule-table thead tr {
  background: var(--ya-head);
}

.ya-schedule-wrap .ya-schedule-table thead th {
  padding: 15px 22px;
  font-family: var(--ya-font);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 2px solid var(--ya-accent);
}

.ya-schedule-wrap .ya-th-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ya-schedule-wrap .ya-th-inner i {
  font-size: 15px;
  color: var(--ya-accent);
}

.ya-schedule-wrap .ya-schedule-table thead th.ya-col-time .ya-th-inner {
  justify-content: flex-end;
}

.ya-schedule-wrap .ya-schedule-table tbody td.ya-col-time {
  text-align: right;
}

/* Tbody редове */
.ya-schedule-wrap .ya-schedule-table tbody tr {
  border-top: 1px solid var(--ya-border);
  transition: background 0.12s;
}

.ya-schedule-wrap .ya-schedule-table tbody tr:hover {
  background: var(--ya-accent-ll);
}

.ya-schedule-wrap .ya-schedule-table tbody td {
  padding: 16px 22px;
  font-family: var(--ya-font);
  font-size: 14px;
  color: var(--ya-body);
  background-color: #fff;
  vertical-align: middle;
  border: none;
}

/* Ден — иконка в кръгче */
.ya-schedule-wrap .ya-day-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ya-schedule-wrap .ya-day-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ya-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.12s;
}

.ya-schedule-wrap .ya-day-icon i {
  font-size: 16px;
  color: var(--ya-accent-dark);
}

.ya-schedule-wrap .ya-day-text {
  font-weight: 600;
  color: var(--ya-head);
  font-size: 14px;
}

/* Повтарящ се ден — избледнял */
/* Повтарящи се дни — същия стил като първия */

/* Практика */
.ya-schedule-wrap .ya-schedule-table tbody td.ya-col-practice {
  font-weight: 500;
  color: var(--ya-head);
}

/* Час pill с иконка */
.ya-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 100px;
  background: var(--ya-accent-light);
  font-size: 13px;
  font-weight: 700;
  color: var(--ya-accent-dark);
  letter-spacing: 0.01em;
}

.ya-time-pill i {
  font-size: 14px;
  color: var(--ya-accent);
}

/* Note pill */
.ya-schedule-wrap .ya-note-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--ya-font);
  padding: 3px 10px;
  border-radius: 100px;
  background: #f5f5f5;
  color: var(--ya-muted);
  border: 1px solid var(--ya-border);
  margin-left: 8px;
  vertical-align: middle;
}

.ya-schedule-wrap .ya-loc-link {
  color: var(--ya-accent);
  text-decoration: none;
}

.ya-schedule-wrap .ya-loc-link:hover {
  text-decoration: underline;
}

.ya-schedule-wrap .ya-schedule-no-results {
  text-align: center;
  padding: 1.5rem;
  color: var(--ya-muted);
  font-size: 14px;
  font-family: var(--ya-font);
  background-color: #fff;
}

.ya-schedule-wrap .ya-schedule-table tbody tr.ya-hidden {
  display: none;
}
.ya-schedule-disabled-panel {
  padding: 32px 24px;
  background: var(--light-bg, #faf8f5);
  border-radius: 12px;
  text-align: center;
  color: var(--body-color, #2c2822);
}
.ya-schedule-disabled-inner p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}
.ya-loc-schedule-disabled-msg a,
.ya-schedule-disabled-inner a {
  color: var(--primary-color, #94a7ae);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.ya-loc-schedule-disabled-msg a:hover,
.ya-schedule-disabled-inner a:hover {
  color: var(--heading-color, #2c2822);
}

/* Инструктор (desktop) */
.ya-schedule-wrap .ya-schedule-table thead th.ya-col-instructor {
  width: 22%;
}

.ya-schedule-wrap .ya-schedule-table tbody td.ya-col-instructor {
  color: var(--ya-body);
}

.ya-schedule-wrap .ya-instructor-link {
  color: var(--ya-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.ya-schedule-wrap .ya-instructor-link:hover {
  color: var(--ya-accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Мобилна адаптация ── */
/* ── Мобилна адаптация ── */
@media (max-width: 640px) {
  .ya-schedule-wrap .ya-schedule-tabs {
    gap: 6px;
  }

  .ya-schedule-wrap .ya-tab {
    padding: 8px 14px;
    font-size: 13px;
    gap: 5px;
  }

  .ya-schedule-wrap .ya-tab i {
    font-size: 15px;
  }

  .ya-schedule-wrap .ya-dropdown {
    min-width: 0;
    width: 100%;
    max-width: 320px;
  }

  /* Таблицата се трансформира в card layout */
  .ya-schedule-wrap .ya-schedule-table,
  .ya-schedule-wrap .ya-schedule-table thead,
  .ya-schedule-wrap .ya-schedule-table tbody,
  .ya-schedule-wrap .ya-schedule-table tr,
  .ya-schedule-wrap .ya-schedule-table td,
  .ya-schedule-wrap .ya-schedule-table th {
    display: block;
  }

  /* Thead се скрива — етикетите са вградени в data-label */
  .ya-schedule-wrap .ya-schedule-table thead {
    display: none;
  }

  /* Всеки ред = карта. ПРОМЯНА: display: flex + flex-wrap, за да
     съберем Практика и Час на един ред. */
  .ya-schedule-wrap .ya-schedule-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid var(--ya-border);
    border-top: 1px solid var(--ya-border);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 14px 16px;
    background: #fff;
  }

  .ya-schedule-wrap .ya-schedule-table tbody tr:hover {
    background: var(--ya-accent-ll);
  }

  /* Всяка клетка — с label вляво, освен ако е override-нато по-долу */
  .ya-schedule-wrap .ya-schedule-table tbody td {
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    font-size: 14px;
  }

  /* Label от data-label атрибут (по подразбиране) */
  .ya-schedule-wrap .ya-schedule-table tbody td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ya-muted);
    min-width: 68px;
    flex-shrink: 0;
    transform: translateY(2px);
  }

  /* Ден — иконката и текстът редом, пълна ширина на реда */
  .ya-schedule-wrap .ya-schedule-table tbody td.ya-col-day {
    flex: 0 0 100%;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ya-border);
    margin-bottom: 4px;
  }

  .ya-schedule-wrap .ya-schedule-table tbody td.ya-col-day::before {
    display: none;
  }

  /* НОВО: скрива реда "Ден" за всички редове с изкл. на първия за деня.
     Разчита на класа .ya-day-first, зададен от ya-schedule.js (recalcDayFirst). */
  .ya-schedule-wrap
    .ya-schedule-table
    tbody
    tr:not(.ya-day-first)
    td.ya-col-day {
    display: none;
  }

  .ya-schedule-wrap .ya-day-icon {
    width: 30px;
    height: 30px;
  }

  .ya-schedule-wrap .ya-day-icon i {
    font-size: 14px;
  }

  /* НОВО: Практика — заема остатъчното пространство на реда, без label */
  .ya-schedule-wrap .ya-schedule-table tbody td.ya-col-practice {
    flex: 1 1 auto;
  }

  .ya-schedule-wrap .ya-schedule-table tbody td.ya-col-practice::before {
    display: none;
  }

  .ya-schedule-wrap .ya-schedule-table tbody td.ya-col-practice {
    order: 1;
  }

  /* Час — ПРОМЯНА: подравнен вдясно на реда, без label */
  .ya-schedule-wrap .ya-schedule-table tbody td.ya-col-time {
    flex: 0 0 auto;
    order: 2;
    text-align: right;
    justify-content: flex-end;
    margin-left: auto;
  }

  .ya-schedule-wrap .ya-schedule-table tbody td.ya-col-time::before {
    display: none;
  }

  /* НОВО: Инструктор — собствен ред под Практика+Час, със свой label.
     order:3 + flex:0 0 100% гарантира, че не разбива горния ред. */
  .ya-schedule-wrap .ya-schedule-table tbody td.ya-col-instructor {
    order: 3;
    flex: 0 0 100%;
    padding-top: 8px;
  }

  /* Table wrap — без overflow hidden на мобилно */
  .ya-schedule-wrap .ya-schedule-table-wrap {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
}
