﻿/* ---------- Kok ---------- */
/* 1280px, ortali */
#info_ticket.calendar-v4 {
  max-width: 1280px;
  margin: 54px auto 72px;
  padding: 0;
  color: #17170d;
  font-family: Inter, Arial, sans-serif;
}
@media (max-width: 1312px) {
  #info_ticket.calendar-v4 {
    padding: 0 16px;
  }
}
@media (max-width: 640px) {
  #info_ticket.calendar-v4 {
    margin: 36px auto 52px;
  }
}
.calendar-v4,
.calendar-v4 *,
.calendar-v4 *::before,
.calendar-v4 *::after {
  box-sizing: border-box;
}
.calendar-v4 > h2 {
  margin: 0 0 22px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
  font-weight: 800;
}
:where(.calendar-v4) button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
:where(.calendar-v4) button:focus-visible {
  outline: 3px solid #806b00;
  outline-offset: 2px;
}

/* Gorunum: haftalik >900px, aylik <=900px */
.calendar-v4 .calendar-v4__week {
  display: block;
}
.calendar-v4 .calendar-v4__month {
  display: block;
}
@media (max-width: 900px) {
  .calendar-v4 .calendar-v4__week {
    display: none;
  }
}
@media (min-width: 901px) {
  .calendar-v4 .calendar-v4__month {
    display: none;
  }
}
/* Ozel sube modu: her genislikte aylik, masaustunde kart */
.calendar-v4[data-calendar-mode="month"] .calendar-v4__week {
  display: none;
}
.calendar-v4[data-calendar-mode="month"] .calendar-v4__month {
  display: block;
  max-width: 760px;
  margin: 0 auto;
  padding: 40px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.05);
}

/* ---------- Baslik + gezinme (haftalik) ---------- */
.calendar-v4__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 28px;
}
.calendar-v4__title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.calendar-v4__title strong {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
}
.calendar-v4__title span {
  font-size: 14px;
  color: #6b6b6b;
}
.calendar-v4__nav {
  display: flex;
  gap: 20px;
}
.calendar-v4__nav button {
  min-height: 40px;
  padding: 8px 0;
  font-size: 16px;
  font-weight: 500;
  color: #17170d;
}
.calendar-v4__nav button:hover {
  text-decoration: underline;
}

/* ---------- Haftalik izgara ---------- */
.calendar-v4__weekgrid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid #eee;
  overflow: hidden;
}
.calendar-v4__daycol {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.calendar-v4__daycol + .calendar-v4__daycol {
  border-left: 1px solid #eee;
}
/* Satirlar sutunlar arasi hizali kalsin: sutunlar grid satirlarini paylasir (--cal-rows JS'ten) */
@supports (grid-template-rows: subgrid) {
  .calendar-v4__daycol {
    display: grid;
    grid-row: 1 / span var(--cal-rows, 1);
    grid-template-rows: subgrid;
  }
}
.calendar-v4__daycol.is-weekend,
.calendar-v4__daycol:nth-child(n + 6) {
  background-color: #fffafa;
}
.calendar-v4__dayhead {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 104px;
  padding: 16px 4px;
  border-bottom: 1px solid #eee;
  text-align: center;
}
.calendar-v4__daynum {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}
.calendar-v4__dayname {
  font-size: 13px;
  color: #6b6b6b;
}

/* Slot: ortada saat, altinda fiyat, altinda etiket */
.calendar-v4__slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 76px;
  padding: 8px 6px;
  border-bottom: 1px solid #eee;
  text-align: center;
  background-color: transparent;
  cursor: pointer;
}
.calendar-v4__slot:not(.is-soldout):not(.is-soon):not(.is-empty):hover {
  background-color: #faf8f2;
}
.calendar-v4__slot:focus-visible {
  outline-offset: -3px;
}
.calendar-v4__time {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  color: #17170d;
}
.calendar-v4__price {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.3;
  color: #6b6b6b;
}
.calendar-v4__tag {
  display: inline-block;
  max-width: 100%;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background-color: #fde9b0;
  color: #7a4b00;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-v4__slot.last-chance .calendar-v4__tag {
  background-color: #fde2e2;
  color: #a4161f;
}
.calendar-v4__slot.free-promo .calendar-v4__tag {
  background-color: #efe3f7;
  color: #5e2f7e;
}
.calendar-v4__slot.seance-desc .calendar-v4__tag {
  background-color: #fde9b0;
  color: #7a4b00;
}
.calendar-v4__slot.is-soldout .calendar-v4__tag,
.calendar-v4__slot.is-soon .calendar-v4__tag {
  background-color: #ececea;
  color: #55554d;
}
.calendar-v4__slot.is-soldout {
  opacity: 0.5;
  cursor: not-allowed;
}
.calendar-v4__slot.is-soon {
  cursor: default;
}
.calendar-v4__slot.is-empty {
  cursor: default;
}

/* ---------- Aylik ---------- */
.calendar-v4__head--month {
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  margin-bottom: 20px;
}
.calendar-v4__head--month > strong {
  flex: 1;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}
.calendar-v4__arrow {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid #e1e1e1;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.calendar-v4__arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-left: 2px solid #17170d;
  border-bottom: 2px solid #17170d;
}
#calendarPrevMonth::before,
#calendarPrevDay::before {
  transform: rotate(45deg);
  margin: -5px 0 0 -3px;
}
#calendarNextMonth::before,
#calendarNextDay::before {
  transform: rotate(-135deg);
  margin: -5px 0 0 -6px;
}
.calendar-v4__monthgrid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  row-gap: 4px;
}
.calendar-v4__dow {
  padding: 8px 0;
  font-size: 12px;
  font-weight: 600;
  color: #6b6b6b;
  text-align: center;
}
.calendar-v4__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  max-width: 48px;
  min-height: 46px;
  margin: 0 auto;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: #17170d;
  cursor: pointer;
}
.calendar-v4__day:hover {
  background-color: #faf8f2;
}
.calendar-v4__day.is-weekend {
  background-color: #fffafa;
}
.calendar-v4__day.is-disabled {
  opacity: 0.35;
  cursor: default;
}
.calendar-v4__day.is-empty {
  visibility: hidden;
}
.calendar-v4__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  min-height: 6px;
}

/* Noktalar (aylik gun + efsane) */
.calendar-v4 .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}
.calendar-v4 .dot--red {
  background-color: #e5484d;
}
.calendar-v4 .dot--purple {
  background-color: #8e4ec6;
}
.calendar-v4 .dot--green {
  background-color: #30a46c;
}

/* ---------- Efsane ---------- */
.calendar-v4__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 20px;
  font-size: 12px;
  color: #6b6b6b;
}
.calendar-v4__legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.calendar-v4__legend .dot {
  width: 8px;
  height: 8px;
}

/* ---------- Bos durum ---------- */
.calendar-v4__empty,
.calendar-v4__noseance {
  margin-top: 16px;
  padding: 32px 20px;
  border-radius: 8px;
  background-color: #f7f7f5;
  color: #6b6b6b;
  font-size: 15px;
  text-align: center;
}
.calendar-v4 [hidden],
.calendar-v4__empty[hidden],
.calendar-v4__overlay[hidden],
.calendar-v4__modal[hidden] {
  display: none !important;
}

/* ---------- Gun modali ---------- */
.calendar-v4__overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.5);
}
.calendar-v4__modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000;
  width: calc(100% - 32px);
  max-width: 460px;
  max-height: 80vh;
  overflow: auto;
  padding: 20px;
  border-radius: 16px;
  background-color: #fff;
  transform: translate(-50%, -50%);
}
.calendar-v4__modal-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.calendar-v4__modal-head h3 {
  flex: 1;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}
.calendar-v4__close {
  flex: none;
  width: 40px;
  height: 40px;
  font-size: 28px;
  line-height: 1;
}
.calendar-v4__modal-sub {
  margin: 8px 0 16px;
  font-size: 14px;
  color: #6b6b6b;
  text-align: center;
}
.calendar-v4__modal-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.calendar-v4__modal-list .calendar-v4__slot {
  min-height: 80px;
  padding: 10px 6px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background-color: #fff;
}
.calendar-v4__modal-list .calendar-v4__slot:not(.is-soldout):not(.is-soon):hover {
  border-color: #806b00;
}

/* ---------- Mobil (<=900px): alttan sheet, dokunma hedefleri >= 40px ---------- */
@media (max-width: 900px) {
  .calendar-v4__modal {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    max-height: 70vh;
    padding: 20px 16px 24px;
    border-radius: 28px 28px 0 0;
    transform: none;
  }
  .calendar-v4__modal-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .calendar-v4__arrow,
  .calendar-v4__close {
    width: 44px;
    height: 44px;
  }
  .calendar-v4__day {
    min-height: 44px;
  }
  .calendar-v4__slot {
    min-height: 40px;
  }
  .calendar-v4__nav button {
    min-height: 44px;
  }
}
@media (max-width: 600px) {
  .calendar-v4[data-calendar-mode="month"] .calendar-v4__month {
    padding: 16px;
  }
}
