/* Current Planet Transit — sidereal positions table + location/time controls. */

/* ---- header row: title + Share/Download on its side ---- */
.page-transit .transit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.page-transit .page-title {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.2;
  flex: 1 1 auto;
  min-width: 0;
}

/* ---- toolbar (Share / Download PDF) ---- */
.transit-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0;
  flex-wrap: wrap;
}

.transit-btn {
  appearance: none;
  border: 1px solid #d9c7a8;
  background: #fff;
  color: #7a1834;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0.95rem;
  border-radius: 9px;
  cursor: pointer;
  min-height: 2.75rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.transit-btn:hover {
  background: #7a1834;
  border-color: #7a1834;
  color: #fff;
}

.transit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Phones: shrink title + tighten buttons so all three fit on one row. */
@media (max-width: 520px) {
  .page-transit .transit-head {
    gap: 0.4rem 0.5rem;
  }

  .page-transit .page-title {
    font-size: 1.02rem;
  }

  .page-transit .transit-toolbar {
    flex: none;
    gap: 0.35rem;
  }

  .page-transit .transit-btn {
    font-size: 0.78rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
  }
}

@media (max-width: 350px) {
  .page-transit .page-title {
    font-size: 0.95rem;
  }
}

/* ---- date / time row ---- */
.transit-when {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.5rem 0 1rem;
}

.transit-when__live {
  font-size: 1.45rem;
  font-weight: 700;
  color: #4a0e1f;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.transit-when__pick {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.transit-when__label {
  font-size: 0.85rem;
  color: #7a6a55;
  font-weight: 600;
}

.transit-when__input {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid #d9c7a8;
  border-radius: 8px;
  background: #fff;
  color: #2a2220;
  min-height: 2.5rem;
}

.transit-when__now {
  appearance: none;
  border: 1px solid #d9c7a8;
  background: #f6efe3;
  color: #7a1834;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  min-height: 2.5rem;
}

.transit-when__now:hover {
  background: #7a1834;
  border-color: #7a1834;
  color: #fff;
}

/* ---- results card ---- */
#transit-result.is-loading {
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

.transit-card {
  border: 1px solid #e7dcc9;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.transit-card__head {
  background: linear-gradient(135deg, #7a1834, #5c1228);
  color: #fff;
  padding: 0.85rem 1.1rem;
}

.transit-card__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.transit-card__sub {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: #f3e6cf;
}

.transit-card__dot {
  opacity: 0.6;
  padding: 0 0.15rem;
}

/* ---- Lagna highlight ---- */
.transit-lagna {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  padding: 0.75rem 1.1rem;
  background: #fbf6ec;
  border-bottom: 1px solid #ecdfca;
}

.transit-lagna__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b07d18;
}

.transit-lagna__sign {
  font-size: 1.05rem;
  font-weight: 700;
  color: #4a0e1f;
}

.transit-lagna__deg {
  font-weight: 600;
  color: #7a1834;
}

.transit-lagna__meta {
  font-size: 0.85rem;
  color: #7a6a55;
}

.transit-gulika {
  background: #f7eef0;
}

.transit-gulika .transit-lagna__label {
  color: #7a1834;
}

/* ---- table ---- */
.transit-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.transit-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 0.9rem;
}

.transit-table thead th {
  background: #f6efe3;
  color: #4a0e1f;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 2px solid #e0d4c4;
  white-space: nowrap;
}

.transit-table tbody td {
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid #efe6d7;
  color: #2a2220;
  vertical-align: middle;
}

.transit-table tbody tr:nth-child(even) td {
  background: #fcf9f3;
}

.transit-table__deg {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.transit-table__pada {
  text-align: center;
}

.transit-table tbody tr.is-retro td {
  background: #fdf3f0;
}

/* planet cell */
.transit-planet {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.transit-planet__glyph {
  font-size: 1.15rem;
  line-height: 1;
  color: #7a1834;
  width: 1.3rem;
  text-align: center;
  flex: 0 0 auto;
}

.transit-planet__icon {
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
  object-fit: contain;
  display: block;
}

/* North Indian Rashi chart */
.transit-chart-wrap {
  margin: 0 0 1.25rem;
  text-align: center;
}

.transit-chart-title {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  font-weight: 700;
  color: #7a1834;
}

.transit-chart-box {
  max-width: 420px;
  margin: 0 auto;
}

.transit-chart {
  width: 100%;
  height: auto;
  display: block;
}

.transit-chart-legend {
  margin: 0.55rem auto 0;
  max-width: 460px;
  font-size: 0.74rem;
  line-height: 1.5;
  color: #9a8a72;
}

.transit-planet__names {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.transit-planet__name {
  font-weight: 600;
  color: #4a0e1f;
}

.transit-planet__sans {
  font-size: 0.74rem;
  color: #9a8a72;
}

/* motion chip */
.transit-motion {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.transit-motion--direct {
  background: #e8f1e8;
  color: #2f6b3a;
}

.transit-motion--retro {
  background: #f6e1da;
  color: #a4341a;
}

.transit-card__note {
  margin: 0;
  padding: 0.75rem 1.1rem 0.9rem;
  font-size: 0.8rem;
  color: #7a6a55;
  line-height: 1.5;
  background: #fbf8f2;
  border-top: 1px solid #efe6d7;
}

.transit-empty {
  padding: 1.2rem;
  text-align: center;
  color: #7a6a55;
}

/* ---- toast ---- */
.transit-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  background: #2a2220;
  color: #fff;
  font-size: 0.9rem;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  max-width: 90vw;
  text-align: center;
}

.transit-toast[hidden] {
  display: none;
}

/* ---- mobile: stack the table into cards ---- */
@media (max-width: 640px) {
  .transit-table {
    min-width: 0;
  }

  .transit-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .transit-table,
  .transit-table tbody,
  .transit-table tr,
  .transit-table td {
    display: block;
    width: 100%;
  }

  .transit-table tbody tr {
    border: 1px solid #efe6d7;
    border-radius: 10px;
    margin: 0 0 0.7rem;
    overflow: hidden;
  }

  .transit-table tbody tr:nth-child(even) td,
  .transit-table tbody tr.is-retro td {
    background: transparent;
  }

  .transit-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid #f1e9db;
    text-align: right;
  }

  .transit-table tbody td:last-child {
    border-bottom: 0;
  }

  .transit-table tbody td::before {
    content: attr(data-th);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #b07d18;
    text-align: left;
  }

  .transit-table td.transit-table__planet {
    background: #faf4ea;
  }

  .transit-table td.transit-table__planet::before {
    display: none;
  }

  .transit-planet {
    width: 100%;
  }

  .transit-table__pada {
    text-align: right;
  }
}

/* ---- Upcoming Planetary Events ---- */
.pe-card {
  margin: 1.4rem 0 0;
  background: #fff;
  border: 1px solid #e7d8bd;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(122, 24, 52, 0.06);
}

.pe-card__title {
  margin: 0;
  padding: 0.85rem 1.1rem;
  background: #7a1834;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.pe-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pe-event {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid #f1e9db;
}

.pe-event:last-child {
  border-bottom: 0;
}

.pe-event--empty {
  color: #6b6357;
  justify-content: center;
  padding: 1.1rem;
}

.pe-event__glyph {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: #7a1834;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
}

.pe-event__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.pe-event__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.pe-event__name {
  color: #7a1834;
  font-weight: 600;
  font-size: 1.02rem;
}

.pe-event__badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: #b07d18;
  background: #faf1dc;
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  white-space: nowrap;
}

.pe-event__when {
  color: #6b6357;
  font-size: 0.92rem;
}

/* Visually hidden, but read by screen readers for the full event description. */
.pe-event__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pe-card__more {
  display: flex;
  justify-content: flex-end;
  padding: 0.6rem 1.1rem;
  background: #faf4ea;
  border-top: 1px solid #f1e9db;
}

.pe-more {
  color: #7a1834;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.pe-more:hover {
  border-bottom-color: #7a1834;
}

/* Full "Upcoming Planetary Transits" page groups events under date headings. */
.pe-page-head {
  margin: 0 0 1rem;
}

.pe-day-group {
  margin: 0 0 1.2rem;
}

.pe-day-group__date {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: #b07d18;
  border-bottom: 1px solid #ecdfc6;
  padding-bottom: 0.3rem;
}

@media (max-width: 480px) {
  .pe-event__glyph {
    width: 2rem;
    height: 2rem;
    font-size: 1.05rem;
  }

  .pe-event__name {
    font-size: 0.96rem;
  }
}
