/* Availability Calendar */

#acal-calendar {
  font-family: inherit;
  margin: 0 auto;
}

.acal-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 24px;
  overflow: hidden;
}

/* Multi-month grid */
.acal-months {
  display: grid;
  grid-template-columns: repeat(var(--acal-cols, 2), 1fr);
  gap: 24px;
}

.acal-month-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2c2c2c;
  text-align: center;
  margin-bottom: 12px;
}

/* Header */
.acal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.acal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c2c2c;
}

.acal-nav {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  line-height: 36px;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.acal-nav:hover:not(:disabled) {
  background: #f5f5f5;
  color: #222;
}

.acal-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Grid */
.acal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.acal-dow {
  margin-bottom: 4px;
}

.acal-dow-cell {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  padding-bottom: 4px;
}

/* Day cells */
.acal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
}

.acal-blank {
  background: transparent;
}

.acal-available {
  background: #e8f5e9;
  color: #2e7d32;
}

.acal-unavailable {
  background: #f3e8e8;
  color: #b0a0a0;
  text-decoration: line-through;
}

.acal-past {
  background: #f8f8f8;
  color: #ccc;
}

.acal-today {
  box-shadow: inset 0 0 0 2px #c8a951;
}

/* Legend */
.acal-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.acal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #777;
}

.acal-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.acal-swatch-available {
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
}

.acal-swatch-unavailable {
  background: #f3e8e8;
  border: 1px solid #e8d5d5;
}

/* Loading / Error */
.acal-loading,
.acal-error {
  text-align: center;
  padding: 48px 24px;
  color: #999;
  font-size: 0.95rem;
}

.acal-error {
  color: #c0392b;
}

/* Responsive — grid columns driven by JS via --acal-cols, these handle spacing/sizing */
@media (max-width: 600px) {
  .acal-card {
    padding: 16px;
    border-radius: 8px;
  }

  .acal-cell {
    font-size: 0.8rem;
    border-radius: 6px;
  }

  .acal-title {
    font-size: 1rem;
  }

  .acal-grid {
    gap: 3px;
  }
}
