/* Creek Motors — Custom Calendar Widget
   Professional themed date picker matching the Creek Motors brand */

.creek-cal {
  position: fixed;
  z-index: 100000;
  width: 340px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(5, 11, 32, 0.18), 0 2px 8px rgba(5, 11, 32, 0.08);
  font-family: "Inter", sans-serif;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
  padding: 0;
  overflow: hidden;
}

.creek-cal.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ── Header ── */
.creek-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  background: linear-gradient(135deg, #050B20 0%, #0F1A3D 100%);
  color: #fff;
}

.creek-cal-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.creek-cal-month {
  font-family: "Outfit", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1;
}

.creek-cal-year {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
  line-height: 1;
}

.creek-cal-nav {
  display: flex;
  gap: 8px;
}

.creek-cal-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.creek-cal-nav-btn:hover {
  background: var(--color-primary, #FF3600);
  border-color: var(--color-primary, #FF3600);
}

.creek-cal-nav-btn:active {
  transform: scale(0.92);
}

/* ── Weekday row ── */
.creek-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 10px 12px 4px;
  gap: 0;
}

.creek-cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #9499A8;
  padding: 6px 0;
}

/* ── Days grid ── */
.creek-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 12px 12px;
  gap: 2px;
}

.creek-cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: #050B20;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  border: none;
  background: transparent;
  padding: 0;
}

.creek-cal-day:hover:not(.disabled):not(.selected) {
  background: #F0F2F8;
}

.creek-cal-day.other-month {
  color: #C8CCD6;
}

.creek-cal-day.today {
  color: var(--color-primary, #FF3600);
  font-weight: 700;
}

.creek-cal-day.today::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-primary, #FF3600);
}

.creek-cal-day.selected {
  background: var(--color-primary, #FF3600);
  color: #fff;
  font-weight: 700;
}

.creek-cal-day.selected::after {
  display: none;
}

.creek-cal-day.disabled {
  color: #E0E3EB;
  cursor: not-allowed;
}

.creek-cal-day.in-range {
  background: #FFF0EB;
  color: var(--color-primary, #FF3600);
  border-radius: 10px;
}

/* ── Footer ── */
.creek-cal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 16px;
  border-top: 1px solid #EEF0F5;
}

.creek-cal-today-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary, #FF3600);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.2s ease;
  letter-spacing: 0.3px;
}

.creek-cal-today-btn:hover {
  background: #FFF0EB;
}

.creek-cal-close-btn {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.2s ease;
  letter-spacing: 0.3px;
}

.creek-cal-close-btn:hover {
  background: #F6F6F6;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .creek-cal {
    width: 300px;
  }
  .creek-cal-day {
    font-size: 13px;
  }
  .creek-cal-month {
    font-size: 16px;
  }
}
@media (max-width: 360px) {
  .creek-cal {
    width: calc(100vw - 20px);
    max-width: 320px;
  }
}
