/**
 * EQTV Frontend Styles
 */

/* Container */
.eqtv-programs-container {
	max-width: 1200px;
	margin: 0 auto;
}

/* Day Header - contains date and timezone selector */
.eqtv-day-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 15px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}

/* Timezone Selector */
.eqtv-timezone-selector {
	display: flex;
	align-items: center;
	gap: 10px;
}

.eqtv-timezone-select {
	min-width: 180px;
	max-width: 250px;
	padding: 6px 10px;
	border: 1px solid #d0d5dd;
	border-radius: 3px;
	background-color: #fff;
	font-size: 14px;
	line-height: 1.4;
	color: #333;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.eqtv-timezone-select:hover {
	border-color: #2c4a6b;
}

.eqtv-timezone-select:focus {
	outline: none;
	border-color: #2c4a6b;
	box-shadow: 0 0 0 3px rgba(44, 74, 107, 0.1);
}

.eqtv-timezone-select optgroup {
	font-weight: 600;
	color: #2c4a6b;
	padding: 5px 0;
}

.eqtv-timezone-select option {
	padding: 5px;
	color: #333;
	font-weight: normal;
}

.eqtv-programs-loading {
	text-align: center;
	padding: 40px 20px;
	color: #666;
}

.eqtv-error {
	background: #f8d7da;
	color: #721c24;
	padding: 15px;
	border-left: 4px solid #dc3232;
	margin: 20px 0;
}

/* Schedule Structure */
.eqtv-schedule-ajax {
	width: 100%;
}

.eqtv-schedule {
	width: 100%;
}

.eqtv-schedule-list {
	width: 100%;
}

/* Day */
.eqtv-day {
	border-radius: 3px;
}

.eqtv-day + .eqtv-day {
	margin-top: 20px;
}

.eqtv-schedule .eqtv-day-date {
	font-size: 22px;
	border-radius: 3px;
	padding: 2px 15px;
	background-color: #2c4a6b;
	color: #fff;
	display: inline-flex;
	margin-bottom: 0;
}

.eqtv-day > .eqtv-day-date:first-child {
	margin-bottom: 10px;
}

/* Program Item */
.eqtv-program {
	background-color: #f7f8f8;
	border-radius: 3px;
	border: 1px solid #e6e6e6;
	font-size: 15px;
	padding: 10px 15px 10px 10px;
	display: flex;
	align-items: self-start;
	gap: 10px;
	position: relative;
}

.eqtv-program:first-child {
	border-radius: 3px 3px 0 0;
}

.eqtv-program:last-child {
	border-radius: 0 0 3px 3px;
}

.eqtv-program + .eqtv-program {
	margin-top: -1px;
}

.eqtv-program:hover {
	z-index: 1;
	background-color: #f7f8f8;
	border-color: #2c4a6b;
}

/* Active Program */
.eqtv-program-active {
	border-color: #ea580c;
	z-index: 1;
	background-color: #ea580c14;
}

/* Program Hours */
.eqtv-program-hours {
	min-width: 50px;
	width: 50px;
}

.eqtv-program-hour {
	display: block;
	white-space: nowrap;
	padding: 0 5px;
	border-radius: 3px;
	background-color: #fff;
	text-align: center;
}

/* Program Header */
.eqtv-program-header {
	/* Empty block for structure */
}

/* Program Title */
.eqtv-program-title {
	font-weight: bold;
	padding-top: 3px;
	padding-bottom: 0;
	line-height: 1.2;
	cursor: pointer;
}

.eqtv-program-title > a {
	text-decoration: none;
}

.eqtv-program-title > a:hover {
	color: #ea580c;
}

/* Program Content */
.eqtv-program-content {
	flex: auto;
}

/* Program Description */
.eqtv-program:not(.open) .eqtv-program-description {
	display: none;
}

.eqtv-program-description-inner {
	line-height: 1.4;
	margin-top: 9px;
	padding-top: 5px;
	padding-bottom: 5px;
	border-top: 1px solid #e6e6e6;
}

/* Program Link */
.eqtv-program-link {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
}

/* AJAX Loading State */
.eqtv-schedule-ajax {

}

.eqtv-schedule-ajax:not(.loaded):after {
	content: '';
	display: block;
	margin: 5px auto;
	width: 26px;
	height: 26px;
	border: 2px solid currentcolor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: 0.75s linear infinite spinner-border;
}

@keyframes spinner-border {
	to {
		transform: rotate(360deg);
	}
}

/* Language Specific Styles */
.eqtv-schedule-lang-ru {
	/* Russian language specific styles if needed */
}

.eqtv-schedule-lang-uk {
	/* Ukrainian language specific styles if needed */
}

.eqtv-schedule-lang-en {
	/* English language specific styles if needed */
}

/* Responsive Styles */
@media (max-width: 768px) {
	.eqtv-day-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.eqtv-timezone-selector {
		width: 100%;
	}

	.eqtv-timezone-select {
		min-width: 100%;
		max-width: 100%;
		width: 100%;
	}

	.eqtv-program {
		flex-direction: column;
		gap: 5px;
		padding: 10px;
	}

	.eqtv-program-hours {
		min-width: auto;
		width: auto;
	}

	.eqtv-schedule .eqtv-day-date {
		font-size: 18px;
		padding: 2px 12px;
	}

	.eqtv-program-title {
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.eqtv-schedule .eqtv-day-date {
		font-size: 16px;
		padding: 2px 10px;
	}

	.eqtv-program {
		padding: 8px;
		font-size: 14px;
	}

	.eqtv-program-description-inner {
		font-size: 13px;
		margin-top: 7px;
	}
}

/* === SCHEDULE WITH CALENDAR === */

/* Schedule Container */
.eqtv-schedule-container {
	max-width: 1200px;
	margin: 0 auto;
}

/* Schedule Header */
.eqtv-schedule-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 20px;
	margin-bottom: 20px;
	flex-wrap: wrap;
	padding: 25px;
	border-radius: 5px;
	border: 1px solid #e6e6e6;
	background-color: #f7f8f8;
}

.eqtv-schedule-timezone-selector {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
}

.eqtv-schedule-timezone-select {
	min-width: 180px;
	max-width: 250px;
	padding: 8px 10px;
	border: 1px solid #d0d5dd;
	border-radius: 3px;
	background-color: #fff;
	font-size: 14px;
	line-height: 1.4;
	color: #333;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.eqtv-schedule-timezone-select:hover {
	border-color: #2c4a6b;
}

.eqtv-schedule-timezone-select:focus {
	outline: none;
	border-color: #2c4a6b;
	box-shadow: 0 0 0 3px rgba(44, 74, 107, 0.1);
}

.eqtv-schedule-timezone-select optgroup {
	font-weight: 600;
	color: #2c4a6b;
	padding: 5px 0;
}

.eqtv-schedule-timezone-select option {
	padding: 5px;
	color: #333;
	font-weight: normal;
}

/* Calendar Widget */
.eqtv-calendar-widget {
	flex: 1;
	min-width: 280px;
}

/* Schedule Controls (timezone selector + from today button) */
.eqtv-schedule-controls {
	display: flex;
	flex-direction: column;
	gap: 33px;
	align-items: flex-start;
}

.eqtv-schedule-fromtoday-wrapper {
	width: 100%;
	text-align: right;
}

.eqtv-calendar-header {
	margin-bottom: 10px;
}

.eqtv-calendar-week-label {
	font-size: 20px;
	font-weight: 600;
	color: #2c4a6b;
}

.eqtv-calendar {
	border-collapse: collapse;
	margin-left: -5px;
	margin-bottom: -5px;
}

.eqtv-calendar td {
	text-align: center;
	padding: 5px;
}

/* Calendar Day/Week Links */
.eqtv-calendar-day,
.eqtv-calendar-week,
.eqtv-calendar-fromtoday {
	display: inline-block;
	padding: 6px 10px;
	text-decoration: none;
	color: #333;
	background-color: #fff;
	border: 1px solid #e6e6e6 !important;
	border-radius: 3px;
	transition: all 0.2s ease;
	min-width: 50px;
	font-size: 16px;
	box-sizing: border-box;
}

.eqtv-calendar-day:hover,
.eqtv-calendar-week:hover,
.eqtv-calendar-fromtoday:hover {
	background-color: #fff;
	border-color: #2c4a6b !important;
	color: #2c4a6b;
}

.eqtv-calendar-day.active,
.eqtv-calendar-week.active,
.eqtv-calendar-fromtoday.active,
.eqtv-calendar-day.active:focus,
.eqtv-calendar-week.active:focus,
.eqtv-calendar-fromtoday.active:focus,
.eqtv-calendar-day.active:hover,
.eqtv-calendar-week.active:hover,
.eqtv-calendar-fromtoday.active:hover {
	background-color: #2c4a6b;
	border-color: #2c4a6b !important;
	color: #fff;
}

.eqtv-calendar-day.today {
	color: #ea580c;
}

.eqtv-calendar-day.today.active {
	color: #fff;
}

/* Previous week styling */
.eqtv-calendar-prev-week .eqtv-calendar-day {
	opacity: 0.7;
}

/* Day names row */
.eqtv-calendar-day-names td {
	font-size: 11px;
	color: #666;
	font-weight: 600;
	text-transform: uppercase;
	padding: 4px 5px;
}

/* From today button - override padding */
.eqtv-calendar-fromtoday {
	padding: 6px 20px;
	box-sizing: border-box;
}

/* Schedule Content */
.eqtv-schedule-content {
	width: 100%;
}

/* Multiple days styling */
.eqtv-schedule-content .eqtv-day + .eqtv-day {
	margin-top: 30px;
}

/* Responsive Styles for Schedule */
@media (max-width: 992px) {
	.eqtv-calendar {
		width: 100%;
		margin-left: initial;
	}
	.eqtv-schedule-header {
		flex-direction: column;
		gap: 15px;
	}

	.eqtv-calendar-widget {
		width: 100%;
	}

	.eqtv-schedule-controls {
		width: 100%;
		gap: 25px;
	}

	.eqtv-schedule-timezone-selector {
		width: 100%;
	}

	.eqtv-schedule-timezone-select {
		min-width: 100%;
		max-width: 100%;
		width: 100%;
	}

	.eqtv-calendar-fromtoday {
		width: 100%;
		text-align: center;
	}

	.eqtv-calendar-header {
		text-align: center;
	}

	.eqtv-calendar-week-label {
		font-size: 18px;
	}

	.eqtv-calendar td {
		padding: 3px;
	}

	.eqtv-calendar-day,
	.eqtv-calendar-week {
		padding: 5px 8px;
		min-width: 25px;
		width: 100%;
		font-size: 16px;
	}

	.eqtv-calendar-fromtoday {
		padding: 6px 15px;
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.eqtv-calendar-week-label {
		font-size: 13px;
	}

	.eqtv-schedule-timezone-select {
		font-size: 13px;
		padding: 6px 10px;
	}

	.eqtv-calendar td {
		padding: 2px;
	}

	.eqtv-schedule-header {
		padding: 15px;
	}

	.eqtv-calendar-day,
	.eqtv-calendar-week {
		padding: 4px 6px;
		min-width: 20px;
		font-size: 12px;
	}

	.eqtv-calendar-day-names td {
		font-size: 10px;
		padding: 3px 2px;
	}

	.eqtv-calendar-fromtoday {
		padding: 5px 12px;
		font-size: 13px;
	}

	.eqtv-schedule-controls {
		gap: 15px;
	}
}
