/**
 * Muhurat Finder — Dawn Vedic.
 *
 * Loaded last in the page head so it wins over monochrome-theme.css and
 * cosmic-ref-theme.css, the same ordering muhuratas.css relies on.
 */

.muhurat-finder-page .mf-hero__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.muhurat-finder-page .mf-lead {
  max-width: 62ch;
  color: var(--text-secondary);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
}

.muhurat-finder-page .mf-chart-context {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.muhurat-finder-page .mf-chart-context small {
  color: var(--text-muted);
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.muhurat-finder-page .mf-chart-context span {
  color: var(--text-secondary);
  font-size: var(--fs-caption);
}

/* ------------------------------------------------------------------ form -- */

.muhurat-finder-page .mf-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
  align-items: start;
  padding: 24px;
  margin-bottom: 28px;
}

.muhurat-finder-page .mf-field {
  display: grid;
  gap: 6px;
}

.muhurat-finder-page .mf-field label {
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--fs-body);
}

.muhurat-finder-page .mf-field select,
.muhurat-finder-page .mf-field input {
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
}

.muhurat-finder-page .mf-field select:focus-visible,
.muhurat-finder-page .mf-field input:focus-visible {
  outline: 2px solid var(--accent-maroon);
  outline-offset: 1px;
}

.muhurat-finder-page .mf-field__hint {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-caption);
  line-height: 1.5;
}

.muhurat-finder-page .mf-form__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.muhurat-finder-page .mf-form__note {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-caption);
}

/* -------------------------------------------------------------- progress -- */

.muhurat-finder-page .mf-progress {
  margin-bottom: 20px;
}

.muhurat-finder-page .mf-progress__bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  overflow: hidden;
}

.muhurat-finder-page .mf-progress__bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-maroon);
  transition: width var(--dur-base) ease;
}

.muhurat-finder-page .mf-progress p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: var(--fs-caption);
}

.muhurat-finder-page .mf-feedback {
  color: var(--text-secondary);
  font-size: var(--fs-body);
}

.muhurat-finder-page .mf-feedback.is-error {
  color: var(--danger);
}

/* --------------------------------------------------------------- results -- */

.muhurat-finder-page .mf-summary {
  padding: 16px 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-card-alt);
}

.muhurat-finder-page .mf-summary__line {
  margin: 0 0 10px;
  color: var(--text-primary);
}

.muhurat-finder-page .mf-summary__counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: var(--fs-caption);
}

.muhurat-finder-page .mf-summary__counts strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.muhurat-finder-page .mf-section-title {
  margin: 32px 0 6px;
}

.muhurat-finder-page .mf-section-note {
  margin: 0 0 16px;
  max-width: 70ch;
  color: var(--text-muted);
  font-size: var(--fs-caption);
}

/* Best days */

.muhurat-finder-page .mf-best {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.muhurat-finder-page .mf-best__item {
  padding: 16px 18px;
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.muhurat-finder-page .mf-best__item.mf-band-excellent {
  border-left-color: var(--success);
}

.muhurat-finder-page .mf-best__item.mf-band-good {
  border-left-color: var(--accent-teal);
}

.muhurat-finder-page .mf-best__item.mf-band-workable {
  border-left-color: var(--accent-saffron);
}

.muhurat-finder-page .mf-best__head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.muhurat-finder-page .mf-best__date {
  display: block;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.0625rem;
}

.muhurat-finder-page .mf-best__panchang {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--fs-caption);
}

.muhurat-finder-page .mf-best__rank {
  flex: none;
  min-width: 44px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-maroon);
  color: var(--text-on-accent);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  text-align: center;
}

.muhurat-finder-page .mf-best__reasons,
.muhurat-finder-page .mf-best__cautions {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: var(--fs-caption);
  line-height: 1.6;
}

.muhurat-finder-page .mf-best__cautions {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-soft);
  color: var(--warning);
}

.muhurat-finder-page .mf-best__empty {
  padding: 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}

/* Full table */

.muhurat-finder-page .mf-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.muhurat-finder-page .mf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-caption);
}

.muhurat-finder-page .mf-table th,
.muhurat-finder-page .mf-table td {
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}

/* No background here: monochrome-theme.css strips th/thead backgrounds with
   !important as a deliberate part of that theme. A heavier bottom rule carries
   the header row instead, and survives every theme. */
.muhurat-finder-page .mf-table thead th {
  border-bottom: 2px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.muhurat-finder-page .mf-table tbody th {
  color: var(--text-primary);
  font-weight: 600;
}

.muhurat-finder-page .mf-table td {
  color: var(--text-secondary);
}

.muhurat-finder-page .mf-table tr.mf-band-excellent {
  background: var(--success-bg);
}

.muhurat-finder-page .mf-table tr.mf-band-blocked {
  background: var(--bg-sunken);
  color: var(--text-muted);
}

/* The reason sits in its own row directly under the day it belongs to, so the
   explanation stays attached when the table scrolls sideways. */
.muhurat-finder-page .mf-table__reason td {
  padding-top: 0;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-style: italic;
  white-space: normal;
}

.muhurat-finder-page .mf-value {
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.muhurat-finder-page .mf-setaside {
  color: var(--danger);
}

.muhurat-finder-page .mf-disclaimer {
  margin-top: 20px;
  max-width: 78ch;
  color: var(--text-muted);
  font-size: var(--fs-caption);
  line-height: 1.6;
}

.muhurat-finder-page .mf-state {
  padding: 32px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-card-alt);
  text-align: center;
}

.muhurat-finder-page .mf-state p {
  max-width: 52ch;
  margin: 8px auto 20px;
  color: var(--text-secondary);
}

@media (max-width: 860px) {
  .muhurat-finder-page .mf-form {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }

  .muhurat-finder-page .mf-best {
    grid-template-columns: 1fr;
  }
}

/* The full day-by-day list, collapsed by default.
   Every day stays available so a date someone already has in mind is answered,
   but the shortlist above is the point of the page and a wall of dates buried
   it. */
.muhurat-finder-page .mf-all-days {
  margin-top: 28px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.muhurat-finder-page .mf-all-days > summary {
  padding: 14px 18px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.muhurat-finder-page .mf-all-days > summary::-webkit-details-marker {
  display: none;
}

/* Own marker, so the control reads the same in every browser. */
.muhurat-finder-page .mf-all-days > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 10px;
  color: var(--accent-maroon);
  transition: transform var(--dur-fast) ease;
}

.muhurat-finder-page .mf-all-days[open] > summary::before {
  transform: rotate(90deg);
}

.muhurat-finder-page .mf-all-days > summary:hover,
.muhurat-finder-page .mf-all-days > summary:focus-visible {
  color: var(--text-primary);
}

.muhurat-finder-page .mf-all-days .mf-section-note {
  margin: 0 18px 12px;
}

.muhurat-finder-page .mf-all-days .mf-table-scroll {
  border: 0;
  border-top: 1px solid var(--border-soft);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.muhurat-finder-page .mf-best__more {
  grid-column: 1 / -1;
  padding: 12px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: var(--fs-caption);
}

/* "I'm using this date" — the action that turns a recommendation into a
   prediction we are held to. */
.muhurat-finder-page .mf-use-date {
  margin-top: 12px;
  padding: 8px 14px;
  width: 100%;
  border: 1px solid var(--accent-maroon);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--accent-maroon);
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}

.muhurat-finder-page .mf-use-date:hover:not(:disabled),
.muhurat-finder-page .mf-use-date:focus-visible:not(:disabled) {
  background: var(--accent-maroon);
  color: var(--text-on-accent);
}

.muhurat-finder-page .mf-use-date:disabled {
  border-color: var(--border-strong);
  color: var(--text-muted);
  cursor: default;
}
