/* Shared styles for the weekly horoscope pages. */

.horoscope-period-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

.horoscope-period-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.75rem 1rem;
  color: hsl(var(--primary));
  font-weight: 600;
  text-align: center;
}

.horoscope-period-nav .is-current {
  color: hsl(35 65% 40%);
  background: linear-gradient(145deg, hsl(45 70% 96%), hsl(130 35% 92%));
  border: 2px solid hsl(45 60% 65%);
}

.horoscope-table-frame {
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem;
  overflow-x: auto;
}

.horoscope-table {
  width: 100%;
  max-width: 38rem;
  min-width: 38rem;
  margin-left: auto;
  margin-right: auto;
  border-collapse: separate;
  border-spacing: 0.075rem 0.15rem;
  table-layout: fixed;
}

.horoscope-table th,
.horoscope-table td {
  padding: 0.125rem;
  text-align: center;
  vertical-align: middle;
}

.horoscope-table thead th {
  color: hsl(var(--primary));
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight: 700;
}

.horoscope-sign-heading,
.horoscope-sign-cell {
  width: 9rem;
}

.horoscope-sign-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left !important;
  border-radius: 0.75rem;
  background: hsl(130 35% 95%);
  color: hsl(var(--primary));
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.horoscope-zodiac-icon {
  display: inline-block;
  margin-right: 0.35rem;
  color: hsl(35 65% 45%);
  font-size: 1.25rem;
}

.horoscope-cell-button {
  width: clamp(2.75rem, 5vw, 3.5rem);
  aspect-ratio: 1;
  margin: auto;
  border: 1px solid hsl(130 25% 72%);
  border-radius: 0.75rem;
  background-color: #fff;
  background-image: url('/goroskop/kruk-02.gif');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 2px 8px hsl(150 20% 30% / 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.horoscope-cell-button:hover,
.horoscope-cell-button:focus-visible {
  transform: scale(1.08);
  border-color: hsl(45 60% 55%);
  box-shadow: 0 5px 14px hsl(45 55% 40% / 0.25);
  outline: none;
}

.horoscope-cell-button.is-open {
  border-color: hsl(45 65% 55%);
  box-shadow: 0 0 0 2px hsl(45 70% 70% / 0.35);
}

.horoscope-weekday {
  display: none;
}

.horoscope-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

.horoscope-legend-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 5rem;
}

.horoscope-legend-item img {
  width: 3.25rem;
  height: 3.25rem;
  flex: 0 0 auto;
  object-fit: contain;
}

@media (max-width: 640px) {
  .horoscope-period-nav {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .horoscope-period-nav a {
    min-height: 3rem;
  }

  .horoscope-table-frame {
    padding: 0.65rem;
    overflow: visible;
  }

  .horoscope-table,
  .horoscope-table thead,
  .horoscope-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .horoscope-table tr {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
    width: 100%;
  }

  .horoscope-table thead {
    margin-bottom: 0.5rem;
  }

  .horoscope-table tbody tr {
    margin-bottom: 0.75rem;
    padding: 0.45rem;
    border: 1px solid hsl(130 25% 78%);
    border-radius: 1rem;
    background: hsl(130 35% 97% / 0.8);
  }

  .horoscope-table th,
  .horoscope-table td {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 0;
  }

  .horoscope-sign-heading {
    display: none !important;
  }

  .horoscope-sign-cell {
    position: static;
    grid-column: 1 / -1;
    justify-content: flex-start !important;
    margin-bottom: 0.25rem;
    padding: 0.35rem 0.5rem !important;
    background: transparent;
  }

  .horoscope-cell-button {
    width: 100%;
    max-width: 3rem;
    min-width: 2rem;
    border-radius: 0.6rem;
  }

  .horoscope-full-date {
    display: none;
  }

  .horoscope-weekday {
    display: inline;
    font-size: 0.75rem;
  }

  .horoscope-legend-grid {
    grid-template-columns: 1fr;
  }
}
