/* Стили для нового календаря мероприятий */

/* Основной контейнер календаря */
.month-calendar {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Заголовок месяца */
.month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, #f783ac 0%, #f783ac 100%);
  color: #fff;
  margin-bottom: 0;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  min-height: 70px;
}

.events__heading {
  width: 100%;
  height: auto;
  text-align: center;
}

.month-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
}

/* Кнопки навигации по месяцам */
.month-nav {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s;
}

.month-nav:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Названия дней недели */
.weekdays-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 5px;
  font-weight: bold;
  padding: 10px 10px;
}

/* Сетка дней */
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-top: 10px;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
}

.days-grid > div {
  width: 100%;
  height: 65px;
  position: relative;
  border-radius: 8px;
  background-color: white;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  border: 1px solid #f0f0f0;
  overflow: hidden; /* Предотвращает вылетание содержимого */
}

.day-cell {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Индикатор количества событий */
.event-indicator {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: #f783ac;
  color: white;
  font-size: 11px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
}

/* События */
.events-header {
  background-color: #f783ac;
  color: white;
  padding: 15px 20px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  text-align: center;
}

.events-header h3 {
  margin: 0;
  font-weight: 600;
  font-size: 1.5rem;
}

.events-container {
  padding: 10px 10px 0 10px;
  overflow-y: auto;
  width: 100%;
}

.event-mini-item {
  display: flex;
  margin-bottom: 15px;
  padding: 0 15px 0 0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  background-color: #fff;
  border: 1px solid #f0f0f0;
  align-items: center;
  height: auto;
  min-height: 70px;
  width: 100%;
  cursor: pointer;
}

.event-mini-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .event-mini-item {
    flex-wrap: wrap;
  }
}

.event-mini-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 75px;
  height: 70px;
  padding: 0;
  background-color: #f06292;
  border-radius: 6px 0 0 6px;
  margin-right: 20px;
  color: white;
}

.event-mini-date .day {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.event-mini-date .month {
  font-size: 14px;
  text-transform: uppercase;
  margin-top: 2px;
}

.event-mini-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-right: 15px;
  margin-left: 90px;
}

@media (max-width: 768px) {
  .event-mini-info {
    width: 100%;
    height: auto;
  }
}

.event-mini-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 350px;
}

.event-mini-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 15px;
  margin-bottom: 0;
  font-size: 0.75rem;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 350px;
}

.event-mini-meta span {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.event-mini-meta span.event-location:hover {
  color: #f783ac;
  text-decoration: underline;
}

.event-mini-meta i {
  margin-right: 3px;
  color: #f783ac;
}

.event-mini-price {
  font-weight: 700;
  color: #ff6b9d;
  font-size: 0.95rem;
  margin-right: 20px;
  white-space: nowrap;
}

.event-mini-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 10px;
  margin-right: 5px;
}

.event-mini-actions.event-mini-actions--with-consent {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.event-mini-actions.event-mini-actions--with-consent .event-mini-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.event-mini-actions.event-mini-actions--with-consent .event-calendar-consent {
  max-width: 100%;
}

.event-mini-actions.event-mini-actions--with-consent .event-calendar-consent label a {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .event-mini-actions {
    width: 100%;
    height: auto;
    justify-content: start !important;
    margin-left: 90px !important;
    margin-bottom: 15px;
  }
}

@media (max-width: 375px) {
  .event-mini-actions {
    flex-wrap: wrap;
  }
  .event-mini-actions button {
    width: 100%;
    height: auto;
  }
  .event-mini-actions--with-consent .event-mini-actions-row {
    flex-direction: column;
    align-items: stretch;
  }
  .event-mini-actions--with-consent .event-mini-actions-row .btn,
  .event-mini-actions--with-consent .event-mini-actions-row a.btn {
    width: 100%;
    justify-content: center;
  }
}

.event-compact-list {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  height: 100%;
}

/* Стили для модального окна с деталями мероприятия */
.events-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.events-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #f06292;
  color: white;
  border-radius: 10px 10px 0 0;
}

.events-modal .modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.events-modal .close-modal {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.events-modal .modal-content {
  background-color: white;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.events-modal .event-item {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}

.events-modal .event-header {
  margin-bottom: 10px;
}

.events-modal .event-title {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  color: #333;
}

.events-modal .event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 10px;
}

.events-modal .event-meta span {
  display: flex;
  align-items: center;
}

.events-modal .event-meta i {
  margin-right: 5px;
}

.events-modal .event-description {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 15px;
  color: #444;
}

.events-modal .event-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.events-modal .event-footer.event-footer--with-consent {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.events-modal .event-footer--with-consent .event-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.events-modal .event-footer--with-consent .event-calendar-consent label a {
  white-space: nowrap;
}

.events-modal .event-price {
  font-weight: 700;
  color: #ff6b9d;
  font-size: 1.1rem;
}

.events-modal .no-events {
  padding: 20px;
  text-align: center;
  color: #666;
}

.metro-station {
  cursor: pointer;
  color: #2196f3;
  text-decoration: underline;
}

.metro-station:hover {
  color: #0b7dda;
}

/* Стили для дней в календаре */
.day {
  width: 100%;
  height: 100%;
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid #f0f0f0;
  background-color: #fff;
  color: #333;
}

/* Мобильная адаптация для календаря */
@media (max-width: 768px) {
  .day {
    min-height: 50px;
    font-size: 14px;
  }
  
  .days-grid {
    gap: 3px;
    padding: 8px;
  }
  
  .days-grid > div {
    height: 50px;
  }
  
  .event-indicator {
    width: 16px;
    height: 16px;
    font-size: 10px;
    top: 3px;
    right: 3px;
  }
}

.day:hover {
  background-color: #f8f8f8;
  border-color: #e0e0e0;
}

.day.selected {
  background-color: #f783ac;
  color: white;
  border-color: #f783ac;
}

.day.today {
  border: 2px solid #f783ac;
  font-weight: bold;
}

.day.has-events {
  font-weight: bold;
  border-color: #f783ac;
}

.day.other-month {
  color: #ccc;
  background-color: #f9f9f9;
}

/* Дни недели */
.calendar-weekday {
  text-align: center;
  font-weight: 600;
  color: #666;
  padding: 8px 0;
  font-size: 14px;
}

/* Стили для списка мероприятий */
.event-mini-item {
  display: flex;
  margin-bottom: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.event-mini-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.event-mini-date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #f783ac;
  color: white;
  padding: 10px 15px;
  min-width: 70px;
  text-align: center;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
}

.event-mini-date .day {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  background: none;
  border: none;
  width: auto;
  height: auto;
  color: white;
}

.event-mini-date .month {
  font-size: 14px;
  text-transform: uppercase;
  margin-top: 2px;
}

.event-mini-info {
  padding: 15px;
  flex-grow: 1;
}

.event-mini-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  font-size: 16px;
}

.event-mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 10px;
  color: #666;
  font-size: 14px;
}

.event-mini-meta i {
  margin-right: 5px;
  color: #f783ac;
}

.event-mini-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-outline-pink {
  color: #f783ac;
  border-color: #f783ac;
}

.btn-outline-pink:hover {
  background-color: #f783ac;
  color: white;
}

.no-events {
  text-align: center;
  padding: 30px 0;
  color: #999;
  font-style: italic;
}

.event-more-container {
  margin-top: 20px;
}

.btn-pink {
  background-color: #f783ac;
  border-color: #f783ac;
  color: white;
}

.btn-pink:hover {
  background-color: #e668a7;
  border-color: #e668a7;
  color: white;
}

/* Адаптивность */
@media (max-width: 768px) {
  .event-mini-date {
    padding: 8px 12px;
    min-width: 60px;
  }

  .event-mini-date .day {
    font-size: 20px;
  }

  .event-mini-info {
    padding: 10px;
  }

  .event-mini-title {
    font-size: 14px;
  }

  .event-mini-meta {
    font-size: 12px;
    gap: 8px;
  }
}

/* Футер календаря */
.calendar-footer {
  padding: 15px;
  text-align: center;
  border-top: 1px solid #e9ecef;
}

/* Список мероприятий */
.events-list {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* .events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--primary-color);
    color: #fff;
} */

.event-date {
  font-size: 18px;
  font-weight: 600;
}

.event-time {
  font-size: 15px;
}

.events-container {
  flex: 1;
  overflow-y: auto;
}

.event-item {
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s;
}

.event-item:hover {
  background-color: #f9f9f9;
}

.event-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.event-info {
  flex: 1;
}

.event-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 3px;
}

.event-location {
  font-size: 12px;
  color: #777;
  margin-bottom: 0;
}

.event-time-display {
  color: #777;
  font-size: 14px;
  font-weight: 600;
  margin-left: 10px;
}

/* Bootstrap #eventModal имеет класс event-modal — не переопределять display/overlay,
   иначе ломается центрирование modal-dialog. Темизация в event-modal.css / global.css. */

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: #777;
}

.close-modal:hover {
  color: #333;
}

.modal-event-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.modal-event-details {
  margin-bottom: 20px;
}

.modal-event-details p {
  margin-bottom: 10px;
  font-size: 15px;
}

.modal-event-description {
  padding: 15px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.modal-event-actions {
  display: flex;
  gap: 10px;
}

/* Стили для элементов в модальном окне дня */
.modal-events-list {
  max-height: 400px;
  overflow-y: auto;
}

.modal-event-item {
  padding: 15px;
  border-bottom: 1px solid #eee;
  margin-bottom: 10px;
}

.modal-event-item h4 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

.modal-event-item p {
  margin-bottom: 5px;
  font-size: 14px;
}

.modal-event-item button {
  margin-top: 10px;
}

/* Адаптивные стили */
@media (max-width: 991px) {
  .month-calendar {
    margin-bottom: 30px;
  }

  .events-list {
    height: auto;
  }

}

@media (max-width: 576px) {
  .month-header h3 {
    font-size: 20px;
  }

  .days-grid > div {
    font-size: 12px;
  }

  .event-modal-content {
    padding: 20px;
  }

  .modal-event-title {
    font-size: 18px;
  }
}

/* Кнопки */
.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  white-space: nowrap;
  border-radius: 4px;
}

/* Контейнеры */
.calendar-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.events-section {
  width: 100%;
}

.events-list {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
}

.events-header {
  background-color: #f06292;
  color: white;
  padding: 15px;
  margin-bottom: 0;
}

.events-header h3 {
  margin: 0;
  font-weight: 600;
  font-size: 1.3rem;
}

.show-all-events-btn {
  margin-bottom: 20px;
  margin-top: 15px;
  width: 90%;
  max-width: 400px;
}

.text-center.mt-3.mb-3 {
  margin-bottom: 25px;
}

/* Стили для кнопок в карточке события */
.event-mini-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 10px;
  margin-right: 5px;
}

/* Стили для кнопки "Подробнее" */
.btn-details {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  white-space: nowrap;
  border-radius: 4px;
  color: #f06292;
  border: 1px solid #f06292;
  background-color: transparent;
  transition: all 0.3s ease;
}

.btn-details:hover {
  background-color: #f06292;
  color: white;
}

/* Стили для кнопки "Купить" */
.btn-buy {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  white-space: nowrap;
  border-radius: 30px;
  color: white;
  border: 1px solid #f06292;
  background-color: #f06292;
  transition: all 0.3s ease;
  padding: 10px 20px;
}

.btn-buy:hover {
  background-color: #e91e63;
}

/* Стили для цены */
.event-mini-price {
  font-weight: 700;
  color: #ff6b9d;
  font-size: 0.95rem;
  margin-right: 10px;
  white-space: nowrap;
}

.month-calendar,
.events-list {
  height: auto;
  min-height: 550px;
}

.events-list {
  max-height: 550px;
}

.event-detail-item {
  margin-bottom: 15px;
}

.event-detail-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.event-detail-label {
  font-weight: bold;
  color: #000;
}
