.schedule-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 200px;
  width: 100%;
  padding: 48px 0;
}

.schedule-loading-text {
  font-family: "AA Stetica", sans-serif;
  font-size: 16px;
  color: #909785;
  text-transform: lowercase;
}

.schedule-loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(144, 151, 133, 0.25);
  border-radius: 50%;
  border-top-color: #909785;
  animation: schedule-spin 0.9s ease-in-out infinite;
}

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

.practice-card-master-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.practice-card-master-link:hover {
  color: #727967;
}

.section_standart {
  margin: 200px 72px !important;
}

.practice-div {
  grid-template-columns: repeat(7, 200px) !important; 
  justify-content: center;
  gap: auto  !important;
}

.main-scheldule-container {
  width: 100%;
  display: flex;
  gap: 20px;
  border-bottom: 1px solid #909785;
  margin-bottom: 48px;
  padding-bottom: 18px;
  flex-direction: column;
}

.section_standart {
  gap: 32px !important;
}

.practice-head-text {
  color: #000;
  font-family: 'Ledger', serif;
  font-size: 36px;
  font-weight: 400;
  margin-bottom: 24px;
}

/* Фильтры */
.filter-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #F5F5F5;
  width: 100%;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

.location-filters {
  display: flex;
  gap: 12px;
}

.location-btn {
  padding: 8px 20px;
  border-radius: 24px;
  border: 1px solid #909785;
  background: #F5F5F5;
  color: #909785;
  font-family: "AA Stetica", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.location-btn.active {
  background: #909785;
  color: white;
}

.filter-dropdown {
  position: relative;
  min-width: 200px;
  border-radius: 22px;
}

.day-head {
    display: flex;
    padding: 9px 18px;
    align-items: center;
    border-radius: 25px !important;
    border: 1px solid #C99F90;
    background: #FFF2EE;
    color: #C58C78;
    font-family: "AA Stetica";
    font-size: 22px !important; 
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    width: 70px;
    display: flex;
    justify-content: center;
    align-self: center;
}

.filter-select {
  width: 100%;
  padding: 10px 16px;
  border-radius: 22px;
  border: 1px solid  #909785;
  color: #909785;
  background: #F5F5F5;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("../icons/drop_closed.svg");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  transition: all 0.3s ease;
}

.filter-dropdown:not(.week-selector)::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  background-image: url("../icons/drop_closed.svg");
  background-size: contain;
  background-repeat: no-repeat;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.filter-dropdown:not(.week-selector).open::after {
  transform: translateY(-50%) rotate(180deg);
}

.filter-dropdown:not(.week-selector) .filter-select {
  background-image: none;
  padding-right: 36px;
}

.week-selector {
  position: relative;
  min-width: 300px;
  text-align: center;
  margin-left: auto
}

.week-display {
  padding: 10px 16px;
  border: 1px solid #909785;
  border-radius: 22px;
  background: #F5F5F5;
  cursor: pointer;
  min-width: 200px;
  font-size: 14px;
  color: #909785;
}

.calendar-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #F5F5F5;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 1000;
  display: none;
  padding: 16px;
  min-width: 300px;
}

.calendar-dropdown.show {
  display: block;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 12px;
}

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

.calendar-nav {
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 18px;
  color: #666;
}

.calendar-day {
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #666;
}

.calendar-date {
  padding: 8px;
  text-align: center;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.2s;
}

.calendar-date:hover {
  background: #f0f0f0;
}

.calendar-date.in-week {
  background: #C58C78;
  color: white;
}

.calendar-date.week-start {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.calendar-date.week-end {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.calendar-date.other-month {
  color: #ccc;
}

/* Пагинация */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 0px;
  background: #F5F5F5;
  width: 100%;
}

.pagination-nav {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  width: 100%;
  margin-top: 32px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #909785;
  background: #F5F5F5;
  color: #909785;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
  background: #909785;
  color: white;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.week-info {
  color: #4D1400;
  font-family: Ledger;
  font-size: 32px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

/* Расписание */
.practice-div {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 32px;
}

.day-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.day-date {
  font-size: 12px;
  opacity: 0.8;
}


.practice-card-body:hover {
  transform: translateY(-2px);
}

.practice-card-time {
  color: #702C29;
  font-family: "AA Stetica", sans-serif;
  font-size: 16px !important;
  font-weight: 500;
  margin-bottom: 8px;
}

.practice-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
  padding-right: 34px;
}

.practice-card-top .practice-card-time {
  margin-bottom: 8px;
}

.schedule-type-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  width: 100%;
  padding: 4px 0 8px;
  color: #565351;
  font-family: "AA Stetica", sans-serif;
  font-size: 13px;
  line-height: 1.3;
}

.schedule-type-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.schedule-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: #fff;
}

.schedule-type-icon--offline-event,
.schedule-type-icon--online-event {
  color: #C58C78;
  background: #FFF2EE;
  border-color: #C99F90;
}

.schedule-type-icon--offline-schedule,
.schedule-type-icon--online-schedule {
  color: #727967;
  background: #F3F4F1;
  border-color: #909785;
}

.practice-card-body .schedule-type-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 26px;
  height: 26px;
  z-index: 1;
}

.practice-card-header {
  color: #000;
  font-family: "AA Stetica", sans-serif;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.3;
}

.practice-card-info {
  color: #565351;
  font-family: "AA Stetica", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 4px;
}

.practice-card-body-half {
  display: flex;
  flex-direction: column;
  gap: 0px !important;
  width: 100%;
  align-self: stretch;
}

.practice-card-body-half-bot {
  display: flex;
  flex-direction: column;
  gap: 0px;
  width: 100%;
  align-self: stretch;
}

.practice-card-body {
  position: relative;
  justify-content: space-between;
  max-height: 340px;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: auto !important;
  grid-column: span 1;
  grid-row: span 1;
  min-height: 150px;
  box-sizing: border-box;
}

.location-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 500;
  margin-top: 8px;
}

.location-moscow {
  background: #E3F2FD;
  color: #1976D2;
}

.location-online {
  background: #E8F5E8;
  color: #388E3C;
}


.day-head.today {
  font-weight: bold;
    border: 3px solid #C99F90;
    background: #C99F90;
    color: white;
}


/* Стиль для прошедших мероприятий */
.practice-card-body.past-event {
  opacity: 0.5 !important;
  pointer-events: none !important;
}

/* Стиль для отмененных занятий (ScheduleUnit.class_canceled) */
.practice-card-body.canceled-event {
  opacity: 0.55 !important;
  background-color: #F7F7F7 !important;
  border-left: 3px solid #B0B0B0 !important;
  filter: grayscale(1);
}

.practice-card-body.canceled-event .practice-card-header {
  text-decoration: line-through;
  color: #8A8A8A;
}

.cancel-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #FDE8E8;
  color: #B00020;
  font-family: "AA Stetica", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  width: fit-content;
}

/* Стиль для событий (Event model) - немного другой цвет фона */
.practice-card-body.event-card {
  background-color: #F5F0ED !important;
  border-left: 3px solid #C58C78;
}

.calendar-date.today {
  background-color: #C99F90;
  color: white;
  font-weight: bold;
  border-radius: 12%;
}
/* Responsive */

.schedule-btn-div {
  display: flex;
  flex-direction: row;
  width: 100%;
  justify-content: space-between;
}

.subscription-btn-div {
  display: flex;
  flex-direction: row;
  gap: 18px;
}

.subscription {
  width: 300px !important;
}

.desktop-only {
display: flex;
}


/* Попап занятия (расписание) */
.schedule-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 24px;
  box-sizing: border-box;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.65);
}

.schedule-modal-close {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 1060;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.schedule-modal {
  display: flex;
  width: min(960px, 100%);
  max-height: calc(100vh - 96px);
  background: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.schedule-modal-main {
  flex: 1 1 68%;
  min-width: 0;
  padding: 40px 44px 36px;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow-y: auto;
}

.schedule-modal-title {
  margin: 0 0 10px;
  color: #1a1a1a;
  font-family: Ledger, serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
  line-height: 1.2;
}

.schedule-modal-subtitle {
  margin: 0 0 28px;
  color: #909785;
  font-family: "AA Stetica", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.35;
}

.schedule-modal-body {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.schedule-modal-text {
  flex: 1;
  min-width: 0;
}

.schedule-modal-description {
  font-family: "AA Stetica", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: #4a4a4a;
}

.schedule-modal-description p {
  margin: 0 0 0.85em;
}

.schedule-modal-description p:last-child {
  margin-bottom: 0;
}

.schedule-modal-photo-wrap {
  flex: 0 0 200px;
  max-width: 200px;
}

.schedule-modal-photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  border-radius: 4px;
}

.schedule-modal-more-link {
  display: block;
  margin-top: 24px;
  color: #2f6fed;
  font-family: "AA Stetica", sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.schedule-modal-more-link:hover {
  text-decoration: underline;
}

.schedule-modal-online-access {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.schedule-modal-online-text,
.schedule-modal-online-note {
  margin: 0;
  font-family: "AA Stetica", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: #5f6558;
}

.schedule-online-abonement-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-online-abonement-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(144, 151, 133, 0.35);
  border-radius: 8px;
  background: #f7f7f5;
  box-sizing: border-box;
}

.schedule-online-abonement-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.schedule-online-abonement-name {
  font-family: "AA Stetica", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  color: #2f332b;
}

.schedule-online-abonement-meta {
  font-family: "AA Stetica", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #909785;
}

.schedule-online-abonement-desc {
  font-family: "AA Stetica", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: #5f6558;
}

.schedule-online-abonement-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
}

.schedule-online-abonement-price {
  font-family: "AA Stetica", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  color: #2f332b;
  white-space: nowrap;
}

.schedule-online-abonement-card .more {
  min-width: 112px;
  height: 40px;
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
}

.schedule-online-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 12px 18px;
  border-radius: 4px;
  border: 1px solid var(--Botton-Active-Enabled, #727967);
  background: var(--Botton-Active-Enabled, #727967);
  color: #fff;
  font-family: "AA Stetica", sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}

.schedule-online-btn:hover {
  background: var(--Global-Brown-Brown-50, #C58C78);
  border-color: var(--Global-Brown-Brown-50, #C58C78);
  color: #fff;
}

.schedule-online-btn-primary {
  align-self: flex-start;
}

.schedule-online-btn.is-disabled,
.schedule-online-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.schedule-online-btn.is-disabled:hover,
.schedule-online-btn:disabled:hover {
  background: var(--Botton-Active-Enabled, #727967);
  border-color: var(--Botton-Active-Enabled, #727967);
}

.schedule-modal-sidebar {
  flex: 0 0 32%;
  min-width: 220px;
  max-width: 300px;
  padding: 40px 32px;
  background: #f3f3f3;
  box-sizing: border-box;
}

.schedule-modal-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.schedule-modal-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.schedule-modal-meta-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-top: 1px;
}

.schedule-modal-meta-text {
  color: #4a4a4a;
  font-family: "AA Stetica", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}


/* Секция мастера */
.modal-master-section {
display: flex;
align-items: center;
margin-bottom: 25px;
padding: 15px 0;
border-top: 1px solid #f0f0f0;
}

.modal-master-avatar {
margin-right: 15px;
}

.master-avatar-placeholder {
width: 50px;
height: 50px;
border-radius: 50%;
background: #ddd;
}

.modal-master-name {
font-size: 16px;
font-weight: 500;
color: #333;
}

/* Табы */
.modal-tabs {
display: flex;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 20px;
}

.modal-tab {
background: none;
border: none;
padding: 12px 0;
margin-right: 25px;
font-size: 14px;
color: #999;
cursor: pointer;
position: relative;
transition: color 0.2s ease;
}

.modal-tab.active {
color: #333;
font-weight: 500;
}

.modal-tab.active::after {
content: '';
position: absolute;
bottom: -1px;
left: 0;
right: 0;
height: 2px;
background: #333;
}

/* Контент табов */
.modal-tab-content {
min-height: 100px;
margin-bottom: 25px;
}

.modal-tab-panel {
display: none;
}

.modal-tab-panel.active {
display: block;
}

.modal-tab-panel p {
font-size: 14px;
line-height: 1.6;
color: #555;
margin: 0;
}




.master-photo {
width: 100%;
height: 100%;
object-fit: cover;    
object-position: center;
}

.master-photo-div {
width: 140px;         
height: 140px;
border-radius: 50%;   
overflow: hidden;     
display: flex;
align-items: center;
justify-content: center;
min-width: auto !important; 
max-width: auto !important; 
min-height: auto !important; 
max-height: auto !important; 
}

.master-name {
color: #000;
text-align: center;
font-family: Ledger;
font-size: 24px;
font-style: normal;
font-weight: 400;
line-height: normal;
margin-left: 15px;
}

.name-div {
align-self: center;
}

/* Стили для карточек (добавить курсор pointer) */
.practice-card-body {
cursor: pointer;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.practice-card-body:hover:not(.past-event) {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.practice-card-body.past-event {
cursor: not-allowed;
}


@media (max-width: 768px) {

  .schedule-type-legend {
    gap: 12px 16px;
    font-size: 12px;
  }

  .schedule-modal-overlay {
    padding: 56px 12px 16px;
    align-items: flex-start;
  }

  .schedule-modal-close {
    top: 12px;
    right: 12px;
    font-size: 32px;
  }

  .schedule-modal {
    flex-direction: column;
    max-height: none;
  }

  .schedule-modal-main {
    padding: 28px 20px 24px;
  }

  .schedule-online-abonement-card {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }

  .schedule-online-abonement-aside {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .schedule-online-abonement-card .more {
    min-width: 96px;
  }

  .schedule-modal-sidebar {
    flex: none;
    max-width: none;
    min-width: 0;
    padding: 24px 20px 28px;
  }

  .schedule-modal-body {
    flex-direction: column;
  }

  .schedule-modal-photo-wrap {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .schedule-modal-photo {
    max-height: none;
  }

  
  .desktop-only {
    display: none;
  }
  .week-info  {
    font-size: 22px;
  }

  #prevWeek {
    content: "‹" !important;
  }

  #nextWeek {
    content: "›" !important;
  }
  .section_standart {
      margin: 180px 40px !important;
  }

  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .location-filters {
      justify-content: space-between !important;
  }

  .pagination-container {
    flex-direction: column;
    gap: 16px;
  }

  .week-display {
    min-width: auto;
    width: 100%;
  }

  .practice-div {
      display: flex;
      flex-direction: column;
  }

  .day-head {
      width: 100%;
      text-align: start !important;
      content: "2";
      display: flex;
      justify-content: space-between;
  }

  .day-head.active  {
      width: 100%;
      text-align: start !important;
      content: "1";
  }

  .day-content {
      max-height: 0;
      overflow: hidden;
      transition: all 0.3s ease;
      padding: 0px 20px;

  }

  .location-btn {
      width: 100%;
      padding: 0px !important;
  }

  .day-content.active {
      max-height: 1000px !important;
      padding: 20px;
  }

  .schedule-btn-div {
      display: flex;
      flex-direction: column-reverse !important;
      width: 100%;
      justify-content: center;
      gap: 18px;
  }
  
  .subscription-btn-div {
      width: 100%;
      flex-direction: column;
  }
  
  .telegramm, .subscription {
      width: 100% !important;
  }

  .main-scheldule-container {
      flex-direction: column;
  }

}

@media (min-width: 768px) and (max-width: 1399px) {
  
  .desktop-only {
    display: none;
  }

  .week-info  {
    font-size: 30px;
    width: 100%;
  }

  .practice-div {
      display: flex;
      flex-direction: column;
  }

  .day-head {
      width: 100%;
      text-align: start !important;
      content: "2";
      display: flex;
      justify-content: space-between;
  }

  .day-head.active  {
      width: 100%;
      text-align: start !important;
      content: "1";
  }

  .day-content {
      max-height: 0;
      overflow: hidden;
      transition: all 0.3s ease;
      padding: 0px 20px;

  }

  .day-content.active {
      max-height: 1000px !important;
      padding: 20px;
  }

  .schedule-btn-div {
      display: flex;
      flex-direction: column-reverse !important;
      width: 100%;
      justify-content: center;
      gap: 18px;
  }
  
  .subscription-btn-div {
      width: 100%;
  }
  
  .telegramm, .subscription {
      width: 100% !important;
  }

  .main-scheldule-container {
      flex-direction: column;
  }
}

@media (max-width: 1400px) {
  .practice-div {
    grid-template-columns: repeat(7, 170px) !important;
  }
}

@media (min-width: 1400px) {
  .main-scheldule-container {
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 40px;
  }
 
  .main-scheldule-container .practice-head-text {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 260px;
    margin: 0;
    padding-right: 24px;
    font-size: 56px;
  }
 
  .main-scheldule-container > p:last-child {
    flex: 1;
    margin: 0;
  }
}