/* Nakshatra modal + home — loaded after stylesheet.css (cache-bust separately) */

#nakshatra-modal .nakshatra-modal-card {
  max-width: 420px;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fdf9f1;
  padding: 18px 16px 16px;
  border-radius: 18px;
  position: relative;
  box-sizing: border-box;
}

#nakshatra-modal .nakshatra-modal-title {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: #3c281e;
  margin: 4px 0 14px;
  flex: 0 0 auto;
}

#nakshatra-modal .nakshatra-tabs {
  display: flex;
  gap: 6px;
  background: #ebe4d4;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
  flex: 0 0 auto;
}

#nakshatra-modal .nakshatra-tab {
  flex: 1 1 0;
  border: none;
  background: transparent;
  color: #3c281e;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 6px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  min-height: 36px;
  height: auto;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#nakshatra-modal .nakshatra-tab.is-active {
  background: #3c281e;
  color: #fff;
}

#nakshatra-modal .nakshatra-modal-card {
  height: min(92vh, 720px);
  max-height: 92vh;
}

#nakshatra-modal .nakshatra-panels {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#nakshatra-modal .nakshatra-tab-panel {
  display: flex;
  flex-direction: column;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  transition: none;
}

#nakshatra-modal.show .nakshatra-tab-panel.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

#nakshatra-modal:not(.show) .nakshatra-tab-panel,
#nakshatra-modal:not(.show) .nakshatra-tab-panel.is-active {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#nakshatra-modal #nakshatra-panel-today {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#nakshatra-modal .nakshatra-cat-btn {
  transition: background-color 0.18s ease, color 0.18s ease !important;
}

/* Yearly category pills — must not flex-shrink */
#nakshatra-modal .nakshatra-yearly-cats {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  padding: 4px 0 10px !important;
  margin: 0 0 10px !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  min-height: 48px !important;
  height: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#nakshatra-modal .nakshatra-cat-btn {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: none !important;
  background: #ebe4d4 !important;
  color: #3c281e !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  padding: 10px 16px !important;
  min-height: 40px !important;
  height: auto !important;
  max-height: none !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  position: static !important;
  top: auto !important;
  width: auto !important;
  font-family: inherit !important;
  text-transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: visible !important;
}

#nakshatra-modal .nakshatra-cat-btn.is-active {
  background: #3c281e !important;
  color: #fff !important;
}

#nakshatra-modal .nakshatra-year-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  min-height: 36px;
}

#nakshatra-modal .nakshatra-year-btn {
  border: none;
  background: transparent;
  color: #3c281e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
  min-height: 32px;
  height: auto;
  position: static;
  width: auto;
}

#nakshatra-modal .nakshatra-year-label {
  font-size: 18px;
  font-weight: 800;
  color: #3c281e;
}

#nakshatra-modal .nakshatra-date-nav {
  flex: 0 0 auto;
  margin-bottom: 12px;
}

#nakshatra-modal .nakshatra-today-card,
#nakshatra-modal .nakshatra-specials-title {
  flex: 0 0 auto;
}

#nakshatra-modal #nakshatra-panel-today.is-active {
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}

#nakshatra-modal .nakshatra-specials-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
  flex: 0 0 auto;
  overflow: visible;
}

#nakshatra-modal .nakshatra-list,
#nakshatra-modal .nakshatra-yearly-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
  flex: 1 1 auto;
  min-height: 120px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

#nakshatra-modal .nakshatra-special-item,
#nakshatra-modal .nakshatra-list-item,
#nakshatra-modal .nakshatra-yearly-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(60, 40, 30, 0.08);
  box-shadow: 0 1px 4px rgba(60, 40, 30, 0.05);
  flex: 0 0 auto;
}

#nakshatra-modal .nakshatra-special-item {
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.nakshatra-home-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f9f6e8 !important;
  width: 100%;
  box-sizing: border-box;
}

.nakshatra-current-panel {
  background: #fff;
  border-radius: 16px;
  padding: 16px 14px 14px;
  box-shadow: 0 2px 6px rgba(60, 40, 30, 0.08);
  border: 1px solid rgba(60, 40, 30, 0.08);
  text-align: center;
}

.nakshatra-home-label {
  color: #b8860b;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.nakshatra-home-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.nakshatra-home-name {
  color: #3c281e;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.nakshatra-home-index {
  color: #6b5a4e;
  font-size: 13px;
  margin-top: 2px;
}

.nakshatra-home-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: #f3eedd;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(60, 40, 30, 0.1);
}

.nakshatra-home-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nakshatra-today-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #f8dde8;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(60, 40, 30, 0.12);
}

.nakshatra-today-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nakshatra-special-icon,
.nakshatra-list-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.nakshatra-list-item.is-active {
  background: #fff8f0 !important;
  border: 1.5px solid #f5a623 !important;
  box-shadow: 0 0 0 1px #f5a623, 0 2px 8px rgba(245, 166, 35, 0.18) !important;
}

.nakshatra-home-remaining {
  margin-top: 10px;
  color: #c47a12;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767px) {
  #nakshatra-modal .nakshatra-modal-card {
    max-width: 100%;
    width: calc(100vw - 24px);
    margin: 0 auto;
    padding: 16px 12px 14px;
  }

  #nakshatra-modal .nakshatra-tab {
    font-size: 11px;
    padding: 8px 4px;
  }

  #nakshatra-modal .nakshatra-cat-btn {
    font-size: 12px !important;
    padding: 9px 12px !important;
  }
}
