.simple-calendar {
  .calendar-heading {
    display: none;
  }

  table {
    -webkit-border-horizontal-spacing: 0px;
    -webkit-border-vertical-spacing: 0px;
    background-color: rgba(0, 0, 0, 0);
    border: 1px solid rgb(221, 221, 221);
    border-collapse: collapse;
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
  }

  tr {
    border-collapse: collapse;
  }

  th {
    padding: 6px;
    border-bottom: 2px solid rgb(221, 221, 221);
    border-collapse: collapse;
    border-left: 1px solid rgb(221, 221, 221);
    border-right: 1px solid rgb(221, 221, 221);
    border-top: 0px none rgb(51, 51, 51);
    box-sizing: border-box;
    text-align: left;
  }

  td {
    padding: 6px;
    vertical-align: top;
    width: 14%;
    border: 1px solid #ddd;
    border-top-color: rgb(221, 221, 221);
    border-top-style: solid;
    border-top-width: 1px;
    border-right-color: rgb(221, 221, 221);
    border-right-style: solid;
    border-right-width: 1px;
    border-bottom-color: rgb(221, 221, 221);
    border-bottom-style: solid;
    border-bottom-width: 1px;
    border-left-color: rgb(221, 221, 221);
    border-left-style: solid;
    border-left-width: 1px;
  }

  .calendar-heading nav {
    display: inline-block;
  }

  .day {
    height: 80px;
  }

  .wday-0 {}
  .wday-1 {}
  .wday-2 {}
  .wday-3 {}
  .wday-4 {}
  .wday-5 {}
  .wday-6 {}

  .today {
    background: #FFFFC0
  }

  .past {}
  .future {}

  .start-date {}

  .prev-month {
    background: #DDD;
  }
  .next-month {
    background: #DDD;
  }
  .current-month {}

  .has-events {}
}

/* celestial-controls extends .control base class */
.celestial-controls {
  /* Inherits from .control */
  /* Width is constrained by .control base class (240px max-width) */
}

.celestial-controls h3 {
  margin: 0 0 15px 0;
  font-family: 'Cinzel', 'Georgia', serif;
  color: #333;
}

.celestial-controls-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.celestial-control-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  border: 2px solid #ddd;
}

.celestial-control-item label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
}

.celestial-toggle {
  cursor: pointer;
}

.celestial-color-picker {
  width: 40px;
  height: 30px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}

.celestial-card-small {
  width: 30px;
  height: auto;
  border-radius: 2px;
  border: 2px solid;
  margin: 2px;
  display: inline-block;
}

.member-card {
  border: none !important;
}

.cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 4px;
}

.celestial-card-container {
  display: inline-block;
  position: relative;
}

.calendar-card__planet-badge {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  z-index: 4;
  pointer-events: none;
}

.calendar-card__planet-badge[data-reading="yearly"] {
  top: 2px;
  left: 2px;
}

.calendar-card__planet-badge[data-reading="planetary"] {
  top: 2px;
  right: 2px;
}

.calendar-card__planet-badge[data-reading="weekly"],
.calendar-card__planet-badge[data-reading="week"] {
  bottom: 2px;
  left: 2px;
}

.calendar-card__planet-badge[data-reading="daily"] {
  bottom: 2px;
  right: 2px;
}

.calendar-card-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -6px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 5;
}

.celestial-card-container:hover .calendar-card-tooltip,
.celestial-card-container:focus-within .calendar-card-tooltip {
  opacity: 1;
}

.calendar-ours-page {
  position: relative;
}

.calendar-ours-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 6rem 0 1.5rem;
  font-size: 0.95rem;
}

.calendar-ours-nav__link {
  color: #1f54b5;
  font-weight: 600;
  text-decoration: none;
}

.calendar-ours-nav__link:hover {
  text-decoration: underline;
}

.calendar-ours-nav__range {
  font-weight: 600;
  color: #333;
}

  .calendar-ours-grid {
    margin-top: 20px;
  }

  .calendar-day-name-mobile {
    display: none;
  }

  /* Mobile: Single column layout for calendar */
  @media (max-width: 480px) {
    .calendar-day-name-mobile {
      display: inline;
    }

    .calendar-ours-grid .simple-calendar table {
      display: block;
    }

    .calendar-ours-grid .simple-calendar thead {
      display: none; /* Hide day names row */
    }

    .calendar-ours-grid .simple-calendar tbody {
      display: block;
    }

    .calendar-ours-grid .simple-calendar tr {
      display: block;
    }

    .calendar-ours-grid .simple-calendar td {
      display: block;
      width: 100%;
      border-left: none;
      border-right: none;
      border-top: 1px solid #ddd;
      border-bottom: none;
      height: auto;
      min-height: 80px;
    }
  }

  .calendar-ours-control {
  width: 100%;
  max-height: none;
  overflow: visible;
}

.celestial-control-section {
  margin-bottom: 16px;
}

.celestial-control-section--colors {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
  transition: max-height 0.3s ease;
}

.celestial-control-section--collapsed {
  max-height: 0;
  overflow: hidden;
  padding-right: 0;
}

.celestial-control-section__title {
  margin: 0 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.celestial-control-section__toggle {
  font-size: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #1f54b5;
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}

.celestial-control-section__title.is-collapsed .celestial-control-section__toggle {
  transform: rotate(-90deg);
}

.celestial-picker {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.85);
}

.celestial-picker__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  font-weight: 600;
  border: 1px solid #2c3e50;
  border-radius: 999px;
  background: #fdfdfa;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.celestial-picker__trigger:hover {
  background: #eef2ff;
  border-color: #1f54b5;
}

.celestial-picker__panel {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: min(90vw, 900px);
  max-height: 80vh;
  overflow-y: auto;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 248, 255, 0.98));
  border: 2px solid rgba(31, 84, 181, 0.15);
  border-radius: 32px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 0 9999px rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

.celestial-picker.is-open .celestial-picker__panel {
  display: block;
}

.celestial-picker__section {
  margin-bottom: 24px;
}

.celestial-picker__section-title {
  margin: 0 0 12px;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1f54b5;
  font-weight: 700;
}

.celestial-picker__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 60px;
  align-items: center;
  justify-content: center;
}

.celestial-picker__empty {
  font-size: 12px;
  color: #6c7a89;
  margin: 0;
}

.celestial-picker__pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 32px 6px 12px;
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.celestial-picker__pill--active {
  border-color: rgba(31, 84, 181, 0.4);
  background: rgba(238, 242, 255, 0.95);
}

.celestial-picker__pill.sortable-chosen {
  opacity: 0.9;
  transform: scale(1.03);
}

.celestial-picker__pill.sortable-ghost {
  opacity: 0.4;
}

.celestial-picker__pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.celestial-picker__swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #999;
  display: inline-block;
  flex-shrink: 0;
}

.celestial-picker__label {
  white-space: nowrap;
}

.celestial-picker__toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(31, 84, 181, 0.35);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, background 0.15s ease;
}

.celestial-picker__toggle:hover {
  background: rgba(31, 84, 181, 0.12);
}

.celestial-picker__pill:hover .celestial-picker__toggle,
.celestial-picker__pill:focus-within .celestial-picker__toggle {
  opacity: 1;
  pointer-events: auto;
}

.celestial-picker__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(31, 84, 181, 0.15);
}

.celestial-picker__hint {
  display: none;
}

.celestial-picker__close {
  border: none;
  border-radius: 999px;
  padding: 12px 32px;
  background: #1f54b5;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(31, 84, 181, 0.3);
  transition: background 0.2s ease, transform 0.1s ease;
}

.celestial-picker__close:hover {
  background: #163b80;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(31, 84, 181, 0.4);
}

.celestial-picker__close:active {
  transform: translateY(0);
}

.celestial-control-section--observed .celestial-observations-list {
  display: grid;
  gap: 12px;
}

.celestial-observation-group {
  background: rgba(236, 239, 244, 0.8);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 10px;
}

.celestial-observation-group__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
}

.celestial-observation-group__checkbox {
  width: 16px;
  height: 16px;
}

.celestial-controls-list--observed {
  display: grid;
  gap: 8px;
}

.celestial-control-section__title {
  margin: 0 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.celestial-reading-type-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.celestial-reading-type-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.celestial-reading-type-option__checkbox {
  width: 16px;
  height: 16px;
}

.celestial-control-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  gap: 8px;
}

.sortable-handle {
  cursor: grab;
  font-size: 16px;
  color: #566573;
}

.sortable-handle:active {
  cursor: grabbing;
}

.sortable-ghost {
  opacity: 0.6;
}

.celestial-control-item__label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}

.celestial-control-item__birth-card-image {
  width: 28px;
  height: auto;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.celestial-control-item__name {
  white-space: nowrap;
}

.celestial-color-picker {
  width: 40px;
  height: 28px;
}

/* Monthly calendar backgrounds - unique color per month */
.calendar-day-content {
  padding: 4px;
  border-radius: 4px;
  min-height: 100%;
}

/* Winter */
.calendar-day-content[data-month="12"] {
  background: linear-gradient(135deg, rgba(176, 224, 230, 0.3), rgba(135, 206, 235, 0.3)); /* Light blue */
}

.calendar-day-content[data-month="1"] {
  background: linear-gradient(135deg, rgba(155, 200, 235, 0.3), rgba(120, 180, 220, 0.3)); /* Icy blue */
}

.calendar-day-content[data-month="2"] {
  background: linear-gradient(135deg, rgba(165, 105, 189, 0.3), rgba(142, 68, 173, 0.3)); /* Lavender/purple */
}

/* Spring */
.calendar-day-content[data-month="3"] {
  background: linear-gradient(135deg, rgba(152, 251, 152, 0.3), rgba(144, 238, 144, 0.3)); /* Light green */
}

.calendar-day-content[data-month="4"] {
  background: linear-gradient(135deg, rgba(82, 190, 128, 0.3), rgba(88, 214, 141, 0.3)); /* Emerald */
}

.calendar-day-content[data-month="5"] {
  background: linear-gradient(135deg, rgba(241, 148, 138, 0.3), rgba(236, 112, 99, 0.3)); /* Rose/coral */
}

/* Summer */
.calendar-day-content[data-month="6"] {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(244, 208, 63, 0.3)); /* Golden yellow */
}

.calendar-day-content[data-month="7"] {
  background: linear-gradient(135deg, rgba(248, 196, 113, 0.3), rgba(235, 152, 78, 0.3)); /* Apricot */
}

.calendar-day-content[data-month="8"] {
  background: linear-gradient(135deg, rgba(230, 126, 34, 0.3), rgba(211, 84, 0, 0.3)); /* Orange */
}

/* Autumn */
.calendar-day-content[data-month="9"] {
  background: linear-gradient(135deg, rgba(205, 97, 85, 0.3), rgba(192, 57, 43, 0.3)); /* Terracotta/red */
}

.calendar-day-content[data-month="10"] {
  background: linear-gradient(135deg, rgba(160, 64, 0, 0.3), rgba(186, 74, 0, 0.3)); /* Chestnut brown */
}

.calendar-day-content[data-month="11"] {
  background: linear-gradient(135deg, rgba(125, 102, 8, 0.3), rgba(154, 125, 10, 0.3)); /* Ochre/gold */
}
.celestial-observation-group__name {
  font-size: 13px;
  font-weight: 600;
}

.celestial-observation-group__members {
  display: block;
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}
.celestial-picker__pill:hover .celestial-picker__toggle,
.celestial-picker__pill:focus-within .celestial-picker__toggle {
  opacity: 1;
  pointer-events: auto;
}
