/* ══════════════════════════════════════════════
   Lodgify Availability Calendar – Styles
   Angepasst ans Fjord Panorama Design
   ══════════════════════════════════════════════ */

/* ── Wrapper ────────────────────────────────── */
.lpc-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  color: #333;
  overflow: hidden;
}

/* ── Navigation ─────────────────────────────── */
.lpc-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: flex-end;
}

.lpc-nav button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-gray-300, #d4d4d4);
  border-radius: 0;
  background: var(--color-off-white, #f5f5f5);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
  flex-shrink: 0;
  color: var(--color-primary, #171717);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.lpc-nav button:hover {
  background: var(--color-primary, #171717);
  border-color: var(--color-primary, #171717);
  color: var(--color-white, #fff);
}

/* ── Calendar Grid (months) ─────────────────── */
.lpc-calendar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

/* Modifier für Buchungsseite (50/50 Layout) */
.lpc-calendar--booking {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .lpc-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 550px) {
  .lpc-calendar {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

/* ── Single Month ───────────────────────────── */
.lpc-month {
  min-width: 0;
  overflow: hidden;
  background: var(--color-white, #fff);
  border-radius: 0;
  padding: 20px 16px 16px;
  border: 1px solid var(--color-gray-200, #e5e5e5);
  transition: transform .25s ease;
}

.lpc-month:hover {
  transform: translateY(-2px);
}

.lpc-month-header {
  font-weight: 700;
  font-size: clamp(14px, 1.4vw, 16px);
  margin-bottom: 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-primary, #171717);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-family: inherit;
}
/* ── Weekday Labels ─────────────────────────── */
.lpc-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  font-size: clamp(9px, 1.1vw, 11px);
  font-weight: 700;
  color: var(--color-gray-500, #737373);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lpc-weekdays span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 1px;
}

/* ── Day Grid ───────────────────────────────── */
.lpc-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.lpc-day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(11px, 1.2vw, 13px);
  border-radius: 0;
  transition: all .15s ease;
  overflow: hidden;
  padding: 4px 0;
  line-height: 1;
  font-weight: 500;
}

/* keep cells roughly square */
.lpc-day::before {
  content: "";
  display: block;
  padding-top: 100%;
  float: left;
}

/* Available day */
.lpc-day:not(.lpc-empty):not(.past):not(.blocked):not(.half-checkin):not(.half-checkout) {
  background: #f0f9f0;
  color: #2d5a27;
  cursor: default;
}

/* Blocked day */
.lpc-day.blocked {
  background: #ff5a5f;
  color: #ffffff;
  font-weight: 500;
}

/* Half-day: check-in (afternoon blocked) */
.lpc-day.half-checkin {
  background: linear-gradient(
    to bottom right,
    #f0f9f0 50%,
    #ff5a5f 50%
  );
  color: #2d5a27;
}

/* Half-day: check-out (morning blocked) */
.lpc-day.half-checkout {
  background: linear-gradient(
    to bottom right,
    #ff5a5f 50%,
    #f0f9f0 50%
  );
  color: #2d5a27;
}

/* Past days */
.lpc-day.past {
  color: #a3a3a3;
  background: transparent;
}

/* Today */
.lpc-day.today {
  outline: 2px solid var(--color-primary, #171717);
  outline-offset: -2px;
  font-weight: 700;
  z-index: 1;
}

.lpc-empty {
  background: transparent !important;
}

/* ── Legend ──────────────────────────────────── */
.lpc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-gray-200, #e5e5e5);
}

.lpc-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-light, #525252);
}

.lpc-legend__swatch {
  width: 18px;
  height: 18px;
  border-radius: 0;
  flex-shrink: 0;
  border: 1px solid var(--color-gray-200, #e5e5e5);
}

.lpc-legend__swatch--available {
  background: #f0f9f0;
}

.lpc-legend__swatch--blocked {
  background: #ff5a5f;
}

.lpc-legend__swatch--halfday {
  background: linear-gradient(to bottom right, #f0f9f0 50%, #ff5a5f 50%);
}

.lpc-legend__swatch--today {
  background: #fff;
  outline: 2px solid var(--color-primary, #171717);
  outline-offset: -2px;
}

/* ── Loading / Error ────────────────────────── */
.lpc-loading,
.lpc-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--color-gray-400, #a3a3a3);
  font-size: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lpc-error {
  color: var(--color-gray-800, #262626);
}

.lpc-error i {
  font-size: 24px;
}

/* Loading Spinner */
.lpc-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-gray-200, #e5e5e5);
  border-top: 3px solid var(--color-primary, #171717);
  border-radius: 50%;
  animation: lpc-spin 0.8s linear infinite;
}

@keyframes lpc-spin {
  to { transform: rotate(360deg); }
}
