body{
	background-size: cover;
	background-position: center;
	background-image: url(../image/booking-bg.jpg);
}
.main{
	width: 100%;
	padding: 0 var(--padding);
	margin-top: 2.4rem;
	justify-content: space-between;
	align-items: flex-start;
}
.main h2{
	font-size: 2.2rem;
	color: var(--blue);
	margin-bottom: 2.4rem;
}
.main aside{
	width: 35%;
	flex-direction: column;
}
.main aside ol {
	font-size: 1.4rem;
	list-style-position: inside;
}
.main aside ol li {
	margin-bottom: 8px;
}
.main aside h2{
	width: 100%;
	text-align: center;
}
.main aside p{
	font-size: 1.4rem;
	color: var(--black);
	margin-bottom: 1rem;
}
.main aside ul{
	list-style: none;
	width: 100%;
    min-height: 32rem;
    background: rgba(255, 255, 255, 0.3);
    margin-top: 4rem;
    padding: 1.6rem;
    flex-direction: column;
    margin-bottom: 4rem;
}
.main aside ul h3{
	color: var(--blue);
    font-size: 1.6rem;
    font-weight: 500;
}
.main aside ul li{
	width: 100%;
    border-bottom: 1px solid var(--blue);
    flex-direction: column;
    position: relative;
    margin-top: 2rem;
}
.main aside ul li p{
	margin-bottom: 3rem;
}
.main aside ul li span{
	font-size: 1.3rem;
	position: absolute;
    color: var(--blue);
    bottom: 0;
    right: 0;
    margin-bottom: .2rem;
}
.main article {
	width: 60%;
	display: flex;
	align-items: center;
	flex-direction: column;
}
.main article .tabs {
	width: calc(100% - 12rem);
	padding: 10px 0;
}
.main article .tabs-item {
	margin-right: 2rem;
	font-size: 1.4rem;
	padding: 0.8rem 1.6rem;
	cursor: pointer;
}
.main article .tabs-item.active {
	border-bottom: 2px solid #FFA800;
}
.main article .timetable-wrapper {
	width: 100%;
	align-items: center;
	justify-content: space-between;
}
.main article .timetable-left,
.main article .timetable-right{
	width: 6rem;
	height: 6rem;
	cursor: pointer;
}
.info {
	width: calc(100% - 12rem);
	padding: 10px 0;
	display: none;
	flex-direction: column;
}
.info p {
	font-size: 1.4rem;
}
.info.active {
	display: flex;
}

/* timetable */
.timetable{
	width: calc(100% - 12rem);
	overflow: hidden; 
    border-radius: 22px;
    flex-direction: column;
    box-shadow: 0px 0px 20px rgb(0 0 0 / 25%);
    background: var(--white);
    color: var(--white);
    margin-bottom: 4rem;
}
.timetable header,
.timetable nav,
.timetable .timetable-row,
.timetable .timetable-price{
	width: 100%;
	height: 4rem; 
	align-items: center;
}
.timetable-booking{
	align-items: center;
	display: none;
}
.timetable-booking p{
	font-size: 1.6rem;
	color: var(--blue);
	margin-right: 2rem;
}
.timetable-booking button{
	font-size: 1.2rem;
    padding: 5px 10px;
    border-radius: 50px;
    cursor: pointer;
    color: #fff;
    background-color: var(--blue);
}
.timetable-booking button:hover{
	box-shadow: inset 0px 4px 4px rgb(0 0 0 / 30%);
}
.timetable header{
	position: relative;
	justify-content: center;
	align-items: center;
	background-color: var(--blue);
}
.timetable header h3{
	font-size: 1.6rem;
	font-weight: 500;
}
.timetable header img{
	height: 2rem;
    width: 2rem;
    margin-left: 1rem;
    cursor: pointer;
}
.timetable nav{
	justify-content: center;
	background: rgba(0, 133, 255, 0.5);
}
.timetable nav a{
	 font-size: 1.4rem;
	 color: var(--white);
}
.timetable .timetable-row{
	justify-content: space-around;
    border-bottom: 1px solid rgba(0, 133, 255, 0.5);
}
.timetable .timetable-row span{
    cursor: pointer;
    opacity: .6;
    width: 7rem;
    height: 2.5rem;
    font-size: 1.1rem;
    display: flex;
    border-radius: 40px;
    justify-content: center;
    align-items: center;
}
.timetable .timetable-row span.day{
	background-color: var(--blue);
	color: var(--white);
}
.timetable .timetable-row span.weekend{
	background-color: #FF2E00;
	color: var(--white);
}
.timetable .timetable-row span.weekend1{
	background-color: green;
	color: var(--white);
}
.timetable .timetable-row span.day:hover,
.timetable .timetable-row span.weekend:hover,
.timetable .timetable-row span.weekend1:hover{
	box-shadow: inset 0px 4px 4px rgb(0 0 0 / 30%);
}
.timetable .timetable-row span.none{
	cursor: help !important;
    color: #BCBCBC;
    background-color: #E5E5E5;
	pointer-events: auto !important;
}
.timetable .timetable-price{
	background: #E6F3FF;
    padding: 0 2rem;
    justify-content: space-between;
}
.timetable .timetable-price hgroup{
	align-items: center;
}
.timetable .timetable-price span{
	width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    margin-right: .5rem;
    margin-left: 2rem;
    margin-bottom: 0;
}
.timetable .timetable-price p{
	font-size: 1.4rem;
}
.timetable .timetable-price .price-day p{
	color: var(--blue);
}
.timetable .timetable-price .price-weekend p{
	color: #FF2E00;
}
.timetable .timetable-price .price-weekend1 p{
	color: green;
}
.timetable .timetable-price .price-day span{
	background-color: var(--blue);
}
.timetable .timetable-price .price-weekend span{
	background-color: #FF2E00;
}
.timetable .timetable-price .price-weekend1 span{
	background-color: green;
}

.calendar{
	display: none;
	flex-direction: column;
    position: absolute;
    top: 0;
    z-index: 2;
    width: 30rem;
    height: 31rem;
    padding: 2rem;
    background: var(--white);
    box-shadow: 0px 0px 4px rgb(0 0 0 / 25%);
}
.calendar-header{
	width: 100%;
	margin-bottom: 1.4rem;
	align-items: center;
    justify-content: space-between;
}
.calendar-header p{
	color: var(--black);
	font-size: 1.6rem;
}
.calendar-content{
	flex-wrap: wrap;
}
.calendar-nums,
.calendar-days{
	width: 100%;
	flex-wrap: wrap;
	justify-content: space-around;
}
.calendar-nums span,
.calendar-days span{
	width: 13%;
	margin: 1rem 0;
	display: flex;
	justify-content: center;
	font-size: 1.2rem;
    font-weight: 500;
    color: #000;
}
.calendar-nums span{
	cursor: pointer;
}

.block-1,
.block-2,
.block-3{
	flex-direction: column;
	justify-content: space-between;
	color: var(--black);
}
.block-1 .error{
	margin-top: 2rem;
	display: none;
	color: red;
}
.block-2 hgroup span.active{
	background-color: var(--blue);
}
.block-1 section,
.block-2 section{
	flex-direction: column;
}
.block-1 h3,
.block-2 h3{
	width: 100%;
	text-align: center;
	font-size: 1.6rem;
	color: var(--blue);
	font-weight: 500;
	margin-bottom: 2.4rem;
}
.block-1 p{
	font-size: 1.4rem;
}
.block-1 input{
	margin-top: 1.6rem;
	width: 100%;
    height: 3rem;
    padding: 0 1rem;
    background: #F5F5F5;
    border-radius: 50px;
    color: #999;
    box-shadow: 0px 0px 4px rgb(0 0 0 / 25%);
}
.block-2 hgroup{
	margin-bottom: 1.5rem;
	align-items: center;
}
.block-2 hgroup span{
	border-radius: 50%;
    min-width: 1.2rem;
    width: 1.2rem;
    min-height: 1.2rem;
    height: 1.2rem;
    margin-right: 1rem;
    border: 1px solid var(--blue);
    cursor: pointer;
}
.block-2 hgroup p{
	font-size: 1.2rem;
}
.block-1 footer,
.block-2 footer{
	justify-content: space-between;
}
.block-3 footer{
	justify-content: flex-end;
}
.block-1 footer button,
.block-2 footer button,
.block-3 footer button{
	font-size: .9rem;
    letter-spacing: 1.5px;
    min-width: 6rem;
    padding: 0 .6rem;
    height: 2.5rem;
    border-radius: 50px;
    color: var(--blue);
    border: 1px solid var(--blue);
}
.block-1 footer button:hover,
.block-2 footer button:hover,
.block-3 footer button:hover{
	color: var(--white);
    background-color: var(--blue);
}
.block-3 section{
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
}
.block-3 section p{
	text-align: center;
	font-size: 1.5rem;
	color: #FFA800;
}

#calendar-copy {
	cursor: pointer;
	margin-top: 1rem;
	color: var(--blue);
}

button.close-booking{
	position: absolute;
	z-index: 2;
    top: calc(0% + 1.4rem);
    left: calc(50% + 13rem);
    box-shadow: 0px 0px 4px rgb(0 0 0 / 25%);
    width: 4rem;
    height: 3rem;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    font-weight: 700;
    color: var(--white);
    background-color: var(--blue);
}
button.close-booking img{
	width: 1.2rem;
	height: 1.2rem;
	cursor: pointer;
}

.slider {
	width: 100%;
	height: 300px;
	margin-top: 40px;
	position: relative;
	display: none;
	overflow-x: hidden;
}

.slider.active {
	display: flex;
}

.slider-wrapper {
	transition: .3s;
	position: absolute;
	left: 0;
	width: 100%;
	height: 100%;
}

.slider-wrapper img {
	min-width: 100%;
	object-fit: cover;
	object-position: center;
}

.slider-left {
	position: absolute;
	left: 0;
	top: calc(50% - 32px);
	z-index: 99;
}

.slider-right {
	position: absolute;
	right: 0;
	top: calc(50% - 32px);
	z-index: 99;
	cursor: pointer;
}

/* media */
@media (max-width: 768px) {
	.main{
		flex-direction: column-reverse;
	}
	.main aside,
	.main article{
		width: 100%;
	}
}
@media (max-width: 426px) {
	.main{
		padding: 0 1rem;
	}
	.timetable .timetable-row span{
	    width: 5rem;
	    height: 2rem;
	    font-size: .9rem;
	}
	.timetable .timetable-price{
		align-items: flex-start;
		justify-content: space-around;
		flex-direction: column;
		height: 8rem;
	}
	.timetable .timetable-booking{
		margin-left: 2rem;
	}
}
#description-cort1, #description-cort2, #description-cort3{
	display: none;
}
#description-cort1.active,  #description-cort2.active, #description-cort3.active{
	display: inline-block;
}
/* === Легенда под кортами === */
.court-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin: 8px 0 14px;
  padding: 10px 15px;
  background: #eaf4ff;
  border-radius: 10px;
}

.court-legend .legend-item {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  gap: 6px;
}

.court-legend .swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.court-legend .text {
  color: inherit;
  font-family: 'Arial', sans-serif;
}

/* === Занятые и прошедшие слоты === */
.timetable-row span.none {
  background-color: #e5e5e5 !important;
  color: #999 !important;
  border-radius: 20px !important;
  opacity: 1 !important;
  cursor: default !important;
  box-shadow: none !important;
  transform: none !important;
}

/* === Свободные слоты === */
.timetable-row span.day {
  border-radius: 20px;
  transition: all .15s ease;
  cursor: pointer;
}

.timetable-row span.day:hover {
  box-shadow: 0 0 6px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}

/* === Активные (выбранные) === */
.timetable-row span.active {
  outline: 2px solid #222 !important;
  outline-offset: -2px;
  transform: scale(1.03);
  box-shadow: 0 0 8px rgba(0,0,0,0.25);
  z-index: 2;
}

.timetable-row span:active {
  transform: scale(0.97);
}

/* === Плавное появление легенды при смене даты/вкладки === */
.court-legend {
  opacity: 0;
  animation: legendFade .4s ease forwards;
}

@keyframes legendFade {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* панель бронирования под кортом */
.timetable-booking {
  display: none;
  justify-content: flex-end; /* ← вместо center */
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.timetable-booking p {
  font-weight: 600;
  font-size: 16px;
  color: #333;
  margin: 0;
}

.timetable-booking button {
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all .2s ease;
}

.timetable-booking button:hover {
  background: #005f8a;
  transform: translateY(-1px);
}
/* === Легенда под кортами === */
.court-legend {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:20px;
  margin:8px 0 14px;
  padding:10px 15px;
  background:#eaf4ff;
  border-radius:10px;
  animation:legendFade .4s ease forwards;
}
@keyframes legendFade {
  from{opacity:0;transform:translateY(5px);}
  to{opacity:1;transform:translateY(0);}
}

.court-legend .legend-item {
  display:flex;
  align-items:center;
  font-size:15px;
  font-weight:500;
  gap:6px;
}

.court-legend .swatch {
  width:14px;
  height:14px;
  border-radius:50%;
}

.court-legend .text {
  font-family:Arial, sans-serif;
}

/* Занятые и прошедшие */
.timetable-row span.none {
  background:#e5e5e5 !important;
  color:#999 !important;
  border-radius:20px !important;
  opacity:1 !important;
  cursor:default !important;
}

/* Свободные */
.timetable-row span.day {
  border-radius:20px;
  transition:all .15s ease;
  cursor:pointer;
}
.timetable-row span.day:hover {
  box-shadow:0 0 6px rgba(0,0,0,.25);
  transform:translateY(-1px);
}

/* Выбранные */

.timetable-row span:active {
  transform:scale(0.97);
}

/* Панель бронирования */
.timetable-booking {
  display:none;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin-top:10px;
}
.timetable-booking p {
  font-weight:600;
  font-size:16px;
  color:#333;
  margin:0;
}
.timetable-booking button {
  background:#0073aa;
  color:#fff;
  border:none;
  border-radius:6px;
  padding:8px 14px;
  cursor:pointer;
  transition:all .2s ease;
}
.timetable-booking button:hover {
  background:#005f8a;
  transform:translateY(-1px);
}
/* === Модальное окно бронирования (block-2) === */
.calendar.block-2 {
  display: none;
  position: fixed !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  padding: 30px;
  width: 90%;
  max-width: 500px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn .25s ease forwards;
}

.calendar.block-2 footer {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 20px;
}

.calendar.block-2 button {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}

.calendar.block-2 button:first-child {
  background: #ccc;
  color: #333;
}

.calendar.block-2 button:last-child {
  background: #0073aa;
  color: #fff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -45%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* затемнение фона под модальным окном */
#booking-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9998;
  display: none;
}
/* затемнение фона */
#booking-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9998;
  display: none;
}

/* модальное окно block-2 */
.calendar.block-2 {
  display: none;
  position: fixed !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  padding: 30px 40px;
  width: 90%;
  max-width: 480px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeInModal .25s ease forwards;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: translate(-50%, -45%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

.calendar.block-2 h3 {
  font-size: 22px;
  margin-bottom: 25px;
  text-align: center;
  color: #0073aa;
}

.calendar.block-2 hgroup {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: 0.2s;
}

.calendar.block-2 hgroup span {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #0073aa;
  background: #fff;
  transition: 0.2s;
}

.calendar.block-2 hgroup span.active {
  background: #0073aa;
  box-shadow: 0 0 4px rgba(0,115,170,0.5);
}

.calendar.block-2 hgroup p {
  margin: 0;
  font-size: 15px;
  color: #333;
}

.calendar.block-2 footer {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 25px;
}

.calendar.block-2 footer button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s;
}

.calendar.block-2 footer button:first-child {
  background: #ccc;
  color: #333;
}

.calendar.block-2 footer button:last-child {
  background: #0073aa;
  color: #fff;
}

.calendar.block-2 footer button:last-child:hover {
  background: #005f8a;
}
/* фон под модалкой block-3 */
#block3-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9998;
  display: none;
}

/* модальное окно block-3 */
.calendar.block-3 {
  display: none;
  position: fixed !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 9999;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  width: 90%;
  max-width: 500px;
  padding: 35px 40px 25px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeInBlock3 .3s ease forwards;
}

@keyframes fadeInBlock3 {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.9); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.calendar.block-3 p.calendar-result {
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
  color: #f29b0e;
  margin-bottom: 15px;
}

.calendar.block-3 span#calendar-copy {
  color: #0073aa;
  cursor: pointer;
  margin-bottom: 20px;
  transition: color 0.2s;
}

.calendar.block-3 span#calendar-copy:hover {
  color: #005f8a;
}

.calendar.block-3 footer button {
  border: 1.5px solid #0073aa;
  background: transparent;
  color: #0073aa;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar.block-3 footer button:hover {
  background: #0073aa;
  color: #fff;
}
#block3-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9998;
  display: none;
}

.calendar.block-3 {
  display: none;
  position: fixed !important;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 9999;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  width: 90%; max-width: 500px;
  padding: 35px 40px 25px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeInBlock3 .3s ease forwards;
}

@keyframes fadeInBlock3 {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.9); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.calendar.block-3 p.calendar-result {
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
  color: #f29b0e;
  margin-bottom: 15px;
}

.calendar.block-3 span#calendar-copy {
  color: #0073aa;
  cursor: pointer;
  margin-bottom: 20px;
}

.calendar.block-3 footer button {
  border: 1.5px solid #0073aa;
  background: transparent;
  color: #0073aa;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 15px;
  cursor: pointer;
}

.calendar.block-3 footer button:hover {
  background: #0073aa;
  color: #fff;
}
/* === Кнопка "Ок" в модалке block-3 === */
.calendar.block-3 footer {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 15px;
}

.calendar.block-3 footer button {
  background: linear-gradient(135deg, #0073aa 0%, #009be0 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 10px 28px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 10px rgba(0,115,170,0.3);
  transition: all 0.25s ease;
}

.calendar.block-3 footer button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,115,170,0.4);
  background: linear-gradient(135deg, #009be0 0%, #0073aa 100%);
}

.calendar.block-3 footer button:active {
  transform: scale(0.96);
  box-shadow: 0 2px 6px rgba(0,115,170,0.3);
}
/* === Tooltip Style === */
.slot-tooltip {
  position: absolute;
  z-index: 9999;
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #222;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  min-width: 180px;
  max-width: 260px;
  white-space: normal;
  word-break: break-word;
  text-align: left;
  display: flex;              /* ✅ активируем флекс */
  flex-direction: column;     /* ✅ вертикальное расположение текста */
  gap: 4px;                   /* ✅ аккуратные отступы между строками */
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.slot-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.slot-tooltip::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #fff;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.05);
}

.slot-tooltip b {
  color: #000;
  font-weight: 600;
}

.slot-tooltip small {
  color: #777;
  font-size: 12px;
}

.slot-tooltip-header {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.slot-tooltip-color {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  border: 1px solid rgba(0,0,0,0.2);
}
.slot-tooltip.hide {
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}