/* BalkanTravelers — custom date picker */
.bt-date-host {
  position: relative;
  width: 100%;
}

.bt-date-input-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bt-date-trigger {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid rgba(26, 18, 8, 0.1);
  border-radius: 11px;
  background: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark, #1a1208);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.22s, box-shadow 0.22s, transform 0.18s;
}

.bt-date-trigger:hover {
  border-color: rgba(201, 151, 58, 0.55);
  box-shadow: 0 4px 14px rgba(201, 151, 58, 0.12);
}

.bt-date-trigger:focus-visible {
  outline: none;
  border-color: var(--gold, #c9973a);
  box-shadow: 0 0 0 3px rgba(201, 151, 58, 0.22);
}

.bt-date-trigger.is-open {
  border-color: var(--gold, #c9973a);
  box-shadow: 0 0 0 3px rgba(201, 151, 58, 0.18);
}

.bt-date-trigger.is-placeholder .bt-date-value {
  color: rgba(42, 36, 26, 0.42);
  font-weight: 500;
}

.bt-date-ico {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(201, 151, 58, 0.2) 0%, rgba(201, 151, 58, 0.08) 100%);
  color: var(--gold-dark, #8b6520);
  transition: transform 0.25s ease, background 0.25s;
}

.bt-date-trigger.is-open .bt-date-ico,
.bt-date-trigger:hover .bt-date-ico {
  transform: scale(1.06);
  background: linear-gradient(145deg, rgba(26, 18, 8, 0.92) 0%, rgba(42, 30, 14, 0.95) 100%);
  color: var(--gold, #c9973a);
}

.bt-date-ico svg {
  width: 18px;
  height: 18px;
}

.bt-date-value {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.bt-date-sub {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: rgba(42, 36, 26, 0.48);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* Popup */
.bt-cal-root {
  position: fixed;
  z-index: 10050;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.94);
  transition:
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.28s;
}

.bt-cal-root.is-visible {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.bt-cal {
  width: min(340px, calc(100vw - 24px));
  background: linear-gradient(165deg, #1a1208 0%, #2a1d0e 48%, #1f160c 100%);
  border: 1px solid rgba(201, 151, 58, 0.42);
  border-radius: 18px;
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 40px rgba(201, 151, 58, 0.08);
  overflow: hidden;
  color: #fff;
}

.bt-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(201, 151, 58, 0.2);
}

.bt-cal-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.02em;
}

.bt-cal-title em {
  color: var(--gold, #c9973a);
  font-style: italic;
  font-weight: 700;
}

.bt-cal-nav {
  display: flex;
  gap: 6px;
}

.bt-cal-nav-btn {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(201, 151, 58, 0.35);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold, #c9973a);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.bt-cal-nav-btn:hover {
  background: rgba(201, 151, 58, 0.22);
  border-color: var(--gold, #c9973a);
  transform: scale(1.06);
}

.bt-cal-nav-btn:active {
  transform: scale(0.96);
}

.bt-cal-nav-btn svg {
  width: 18px;
  height: 18px;
}

.bt-cal-body {
  padding: 12px 14px 16px;
  position: relative;
  overflow: hidden;
}

.bt-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.bt-cal-weekday {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  padding: 4px 0;
}

.bt-cal-grid-wrap {
  position: relative;
  min-height: 252px;
}

.bt-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.bt-cal-grid.is-leaving-left {
  opacity: 0;
  transform: translateX(-18px);
}

.bt-cal-grid.is-leaving-right {
  opacity: 0;
  transform: translateX(18px);
}

.bt-cal-grid.is-entering-left {
  opacity: 0;
  transform: translateX(18px);
}

.bt-cal-grid.is-entering-right {
  opacity: 0;
  transform: translateX(-18px);
}

.bt-cal-day {
  aspect-ratio: 1;
  min-height: 40px;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.18s cubic-bezier(0.34, 1.4, 0.64, 1),
    box-shadow 0.2s;
}

.bt-cal-day:not(.is-empty):not(:disabled):hover {
  background: rgba(201, 151, 58, 0.22);
  transform: scale(1.08);
  z-index: 1;
}

.bt-cal-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1.5px rgba(201, 151, 58, 0.65);
  color: var(--gold-light, #e8c57a);
}

.bt-cal-day.is-selected {
  background: linear-gradient(145deg, #d4a84a 0%, #c9973a 50%, #a97d2f 100%);
  color: #1a1208;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(201, 151, 58, 0.45);
  animation: btCalSelect 0.38s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.bt-cal-day.is-in-range:not(.is-selected) {
  background: rgba(201, 151, 58, 0.14);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.92);
}

.bt-cal-day.is-range-start:not(.is-selected),
.bt-cal-day.is-range-end:not(.is-selected) {
  background: rgba(201, 151, 58, 0.28);
}

.bt-cal-day.is-empty {
  pointer-events: none;
  visibility: hidden;
}

.bt-cal-day:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  transform: none !important;
}

.bt-cal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px 14px;
}

.bt-cal-today-btn,
.bt-cal-clear-btn {
  border: none;
  border-radius: 9px;
  padding: 8px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.bt-cal-today-btn {
  background: rgba(201, 151, 58, 0.22);
  color: var(--gold-light, #e8c57a);
  border: 1px solid rgba(201, 151, 58, 0.35);
}

.bt-cal-today-btn:hover {
  background: rgba(201, 151, 58, 0.35);
  transform: translateY(-1px);
}

.bt-cal-clear-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
}

.bt-cal-clear-btn:hover {
  color: #fff;
}

@keyframes btCalSelect {
  0% { transform: scale(0.82); }
  55% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .bt-cal-root,
  .bt-cal-grid,
  .bt-cal-day,
  .bt-date-trigger,
  .bt-date-ico {
    transition: none !important;
    animation: none !important;
  }
  .bt-cal-day.is-selected {
    animation: none;
  }
}

@media (max-width: 600px) {
  .bt-cal {
    width: min(320px, calc(100vw - 20px));
  }
  .bt-cal-day {
    min-height: 38px;
    font-size: 13px;
  }
}
