/* Styles for the device availability calendar widget */

/* Calendar wrapper */
.calendar-wrapper {
  background: #e8e8e8;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.0);
}

/* Navigation header */
.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.calendar-nav button {
  background: transparent;
  border: none;
  cursor: pointer;
}

/* Weekday header */
.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: bold;
}

/* Calendar grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 45px;
  gap: 5px;
  margin-top: 5px;
}

/* Date cells */
.date-cell {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.date-cell:hover {
  background: #dcdcdc;
}

/* Selected state */
.date-cell.selected {
  background: #262620;
  color: #fff;
}

/* Range selection states */
.date-cell.range-start,
.date-cell.range-middle,
.date-cell.range-end {
  background: #262620;
  color: #fff;
}

.date-cell.range-start {
  border-top-left-radius: 50%;
  border-bottom-left-radius: 50%;
}

.date-cell.range-middle {
  margin: 0 -2px;
}

.date-cell.range-end {
  border-top-right-radius: 50%;
  border-bottom-right-radius: 50%;
}

/* Today indicator */
.date-cell.today {
  background: #f9f331;
}

/* Other month & disabled states */
.date-cell.other-month,
.date-cell.disabled {
  opacity: 0.3;
}


/* Action buttons */
.calendar-action-buttons {
  display: flex;
  justify-content: auto;
  margin-top: 10px;
  gap:20px;
}

.btn-cancel,
.btn-reserve {
  border: none;
  border-radius: 25px;
  padding: 0.5em 1.5em;
  cursor: pointer;
  transition: background 0.3s;
  padding: 1.25em 2.5em;
}

.btn-cancel {
  background: #c4c4c4;
}

.btn-cancel:hover {
  background: #b0b0b0;
}

.btn-reserve {
  background: #262620;
  color: #fff;
}

.btn-reserve:hover:not(:disabled) {
  background: #1e1e1e;
}

.btn-reserve:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* Loading state */
.calendar-grid.loading,
#currentMonthYear.loading {
  opacity: 0.5;
  pointer-events: none;
}