/* Мобильные карточки расписания */

.schedule-mobile {
	padding: 5px;
	margin-left: 0;
	margin-right: 0;
}

/* Селекторы курса и группы */
.schedule-filters {
	background: #f8f9fa;
	padding: 15px;
	border-radius: 8px;
	margin-bottom: 20px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.schedule-filters .row {
	align-items: center;
}

.schedule-filters .form-group {
	margin-bottom: 0;
}

.schedule-filters select {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #ced4da;
	border-radius: 6px;
	background-color: white;
	font-size: 16px;
	font-weight: 500;
	min-height: 48px;
}

.schedule-filters select:focus {
	border-color: #007bff;
	outline: none;
	box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

@media (max-width: 576px) {
	.schedule-filters {
		padding: 10px;
	}
	
	.schedule-filters .form-group {
		margin-bottom: 10px;
	}
	
	.schedule-filters select {
		font-size: 14px;
		min-height: 44px;
		padding: 10px 14px;
	}
}

.schedule-day {
	margin-bottom: 20px;
}

.schedule-day-header {
	background: #007bff;
	color: white;
	padding: 10px;
	text-align: center;
	border-radius: 8px 8px 0 0;
	font-weight: bold;
	margin-bottom: 10px;
}

/* Общая карточка занятия */
.schedule-card {
	background: white;
	border: 1px solid #ddd;
	border-radius: 8px;
	margin-bottom: 10px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	overflow: hidden;
}

/* Карточка для одного занятия */
.schedule-card-single {
	padding: 15px;
}

.schedule-card-single .pair-number {
	font-size: 18px;
	font-weight: bold;
	color: #007bff;
	margin-bottom: 8px;
}

.schedule-card-single .discipline-name {
	font-size: 15px;
	font-weight: bold;
	margin-bottom: 8px;
	line-height: 1.3;
}

.schedule-card-single .teacher-cabinet {
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #666;
	font-size: 14px;
}

.schedule-card-single .teacher {
	flex: 0 0 80%; /* 80% ширины для преподавателя */
	word-wrap: break-word;
	overflow-wrap: break-word;
	hyphens: auto;
	margin-right: 8px;
}

.schedule-card-single .cabinet {
	font-weight: bold;
	color: #333;
	flex: 0 0 20%; /* 20% ширины для кабинета */
	text-align: right;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Карточка для двух подгрупп - ГОРИЗОНТАЛЬНАЯ с вертикальным разделителем */
.schedule-card-double {
	display: grid !important;
	grid-template-columns: 1fr 1fr; /* Две равные колонки */
	width: 100%;
	overflow: hidden;
}

.schedule-card-double .subgroup {
	padding: 15px;
	border-right: 1px solid #eee; /* Вертикальный разделитель */
	border-bottom: none !important;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: 100%;
	min-width: 0; /* КРИТИЧНО: позволяет сжиматься меньше содержимого */
	overflow: hidden; /* Предотвращает выход текста за границы */
}

.schedule-card-double .subgroup:last-child {
	border-right: none !important; /* Убираем правую границу у последней подгруппы */
	border-bottom: none !important;
}

.schedule-card-double .pair-number {
	font-size: 16px;
	font-weight: bold;
	color: #007bff;
	margin-bottom: 8px;
}

.schedule-card-double .discipline-name {
	font-size: 13px;
	font-weight: bold;
	margin-bottom: 8px;
	line-height: 1.3;
	flex-grow: 1; /* Занимает доступное пространство */
	word-wrap: break-word; /* Переносит длинные слова */
	overflow-wrap: break-word;
	hyphens: auto; /* Автоматические переносы */
	min-width: 0; /* КРИТИЧНО: позволяет сжиматься */
	max-width: 100%; /* Не превышает ширину контейнера */
}

.schedule-card-double .teacher-cabinet {
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #666;
	font-size: 12px;
	margin-top: auto; /* Прижимает к низу */
	min-width: 0; /* Позволяет сжиматься */
	width: 100%;
}

.schedule-card-double .teacher {
	flex: 0 0 80%; /* 80% ширины для преподавателя */
	margin-right: 5px;
	word-wrap: break-word;
	overflow-wrap: break-word;
	hyphens: auto;
	min-width: 0; /* Позволяет сжиматься */
}

.schedule-card-double .cabinet {
	font-weight: bold;
	color: #333;
	flex: 0 0 20%; /* 20% ширины для кабинета */
	text-align: right;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Стили для свободного времени */
.schedule-card .free-time {
	color: #999;
	font-style: italic;
	background-color: #f8f9fa;
	justify-content: center;
	align-items: center;
	text-align: center;
}

.schedule-card .free-time .discipline-name,
.schedule-card .free-time .teacher,
.schedule-card .free-time .cabinet {
	color: #999;
}

/* Стили для предметов других преподавателей */
.schedule-card .other-teacher {
	color: #999;
	background-color: #f8f9fa;
	opacity: 0.7;
}

.schedule-card .other-teacher .discipline-name,
.schedule-card .other-teacher .teacher,
.schedule-card .other-teacher .cabinet,
.schedule-card .other-teacher .pair-number {
	color: #999;
}

.schedule-card .other-teacher .pair-number {
	color: #bbb;
}

/* Стили для пустых подгрупп */
.schedule-card-double .subgroup.empty {
	background-color: #f8f9fa;
	justify-content: center;
	align-items: center;
	text-align: center;
	color: #999;
	font-style: italic;
}

.schedule-card-double .subgroup.empty .pair-number {
	color: #999;
	margin-bottom: 0;
}

.schedule-card-double .subgroup.empty .discipline-name {
	margin: auto;
	font-size: 14px;
}

/* Карточка для учебной практики - с ГОРИЗОНТАЛЬНОЙ дележкой */
.schedule-card-practice {
	display: flex;
	flex-direction: column;
	background-color: white;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 15px;
	position: relative;
}

/* Подгруппы в карточках практик - ГОРИЗОНТАЛЬНО */
.schedule-card-practice .practice-subgroup {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 15px;
	border-bottom: 1px solid #eee;
	background-color: white;
	flex-direction: row !important; /* Горизонтально */
}

.practice-header {
	padding: 15px;
	background-color: #f8f9fa;
	border-bottom: 1px solid #dee2e6;
}

.practice-header .discipline-name {
	font-size: 16px;
	font-weight: bold;
	color: #333;
	margin-bottom: 5px;
	line-height: 1.3;
}

.practice-header .teacher-cabinet {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.practice-header .teacher {
	font-size: 14px;
	color: #666;
	font-weight: 500;
	flex: 1;
}

.practice-header .cabinet {
	font-size: 14px;
	color: #333;
	font-weight: bold;
	margin-left: 10px;
}

.practice-subgroup {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 15px;
	border-bottom: 1px solid #eee;
	background-color: white;
}

.practice-subgroup:last-child {
	border-bottom: none;
}

.practice-subgroup .pairs {
	font-size: 16px;
	font-weight: bold;
	color: #007bff;
}

.practice-subgroup .subgroup-info {
	display: flex;
	align-items: center;
	gap: 10px;
}

.practice-subgroup .subgroup-number {
	font-size: 14px;
	color: #666;
	font-weight: 500;
}

.practice-subgroup .cabinet {
	font-size: 14px;
	color: #333;
	font-weight: bold;
	background-color: #f0f0f0;
	padding: 2px 6px;
	border-radius: 4px;
}

/* Стили для производственных практик - только заголовок */
.schedule-card-production {
	min-height: auto;
}

.schedule-card-production .practice-header {
	border-bottom: none;
	margin-bottom: 0;
}

/* Стили для карточек практик в расписании преподавателя */
.schedule-card-practice .group-name {
	position: absolute;
	top: 10px;
	right: 15px;
	background-color: #007bff;
	color: white;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: bold;
	z-index: 10;
}

/* Карточка преподавателя */
.schedule-card-teacher {
	position: relative;
}

.schedule-card-teacher .group-name {
	position: absolute;
	top: 10px;
	right: 10px;
	background: #28a745;
	color: white;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: bold;
	z-index: 10;
}

.schedule-card-teacher.schedule-card-single {
	padding-right: 80px; /* Место для названия группы */
}

/* Исправляем карточки преподавателя с подгруппами */
.schedule-card-teacher.schedule-card-double {
	display: grid !important;
	grid-template-columns: 1fr 1fr !important; /* Две равные колонки */
}

.schedule-card-teacher.schedule-card-double .subgroup {
	padding: 25px 15px 15px 15px; /* Увеличиваем верхний отступ для group-name */
	position: relative;
	border-right: 1px solid #eee !important; /* Вертикальный разделитель */
	border-bottom: none !important;
}

.schedule-card-teacher.schedule-card-double .subgroup .pair-number {
	margin-top: 0; /* Убираем дополнительный отступ */
}



/* Скрыть на десктопе */
@media (min-width: 768px) {
	.schedule-mobile {
		display: none;
	}
}

/* Скрыть десктопную версию на мобильных */
@media (max-width: 767px) {
	.schedule-view.landscape,
	.schedule-view table {
		display: none;
	}
}

/* Стили для навигации по неделям */
.week-navigation {
	background-color: #f8f9fa;
	border-radius: 8px;
	border: 1px solid #dee2e6;
}

.week-navigation .btn {
	font-size: 16px;
	padding: 12px 20px;
	border-radius: 6px;
	font-weight: 500;
}


