/* ── Wrapper ────────────────────────────────── */
.lpc-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #333;
  overflow: hidden;
}

/* ── Navigation ─────────────────────────────── */
.lpc-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.lpc-nav button {
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  flex-shrink: 0;
}

.lpc-nav button:hover {
  background: #f5f5f5;
  border-color: #bbb;
}

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

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

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

/* ── Single Month ───────────────────────────── */
.lpc-month {
  min-width: 0;
  overflow: hidden;
}

.lpc-month-header {
  font-weight: 600;
  font-size: clamp(13px, 1.4vw, 15px);
  margin-bottom: 8px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 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: 600;
  color: #999;
  margin-bottom: 4px;
}

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

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

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

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

.lpc-day:not(.lpc-empty):not(.past):not(.blocked):not(.half-checkin):not(.half-checkout) {
  background: #f0faf0;
  color: #2d8a2d;
  cursor: default;
}

.lpc-day.blocked {
  background: #ff5a5f;
  color: #fff;
}

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

/* Half-day: check-out (morning blocked) – diagonal left */
.lpc-day.half-checkout {
  background: linear-gradient(
    to bottom right,
    #ff5a5f 50%,
    #f0faf0 50%
  );
  color: #333;
}

.lpc-day.past {
  color: #ccc;
}

.lpc-day.today {
  outline: 2px solid #333;
  outline-offset: -2px;
  font-weight: 700;
}

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

/* ── Loading / Error ────────────────────────── */
.lpc-loading,
.lpc-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 14px;
}

.lpc-error {
  color: #c0392b;
}
