/**
 * KUBERA ASTRO - VEDIC ASTROLOGY CHARTS & PREVIEW
 * Authentic South Indian 12-Box Grid Layout (Rasi & Navamsam)
 * Strictly under 300 lines compliant (Rule 6).
 */
.charts-display-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.chart-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.chart-box {
  background: rgba(10, 15, 33, 0.9);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-card);
}

.chart-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
  padding-bottom: 0.45rem;
}

.chart-title-bar h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-gold-bright);
}

/* South Indian 4x4 Grid with Center Hollow */
.south-indian-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  border: 2px solid var(--accent-gold);
  border-radius: 6px;
  background: #090e1f;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
}

.r-cell {
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 0.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  font-size: 0.65rem;
  position: relative;
  overflow: hidden;
  min-height: 55px;
}

.r-cell-name {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.r-grahas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.2rem;
}

.graha-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  line-height: 1.1;
}

.graha-lagna { background: rgba(56, 189, 248, 0.25); color: #38bdf8; border: 1px solid #38bdf8; }
.graha-surya { background: rgba(249, 115, 22, 0.25); color: #fb923c; }
.graha-chandra { background: rgba(248, 250, 252, 0.25); color: #fff; }
.graha-guru { background: rgba(234, 179, 8, 0.25); color: #facc15; }
.graha-sukra { background: rgba(236, 72, 153, 0.25); color: #f472b6; }
.graha-sani { background: rgba(99, 102, 241, 0.25); color: #818cf8; }
.graha-sevvai { background: rgba(239, 68, 68, 0.25); color: #f87171; }
.graha-budha { background: rgba(16, 185, 129, 0.25); color: #34d399; }
.graha-rahu { background: rgba(148, 163, 184, 0.25); color: #cbd5e1; }
.graha-ketu { background: rgba(168, 85, 247, 0.25); color: #c084fc; }

.r-center {
  grid-column: 2 / span 2;
  grid-row: 2 / span 2;
  border: 1.5px solid var(--accent-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, rgba(9, 14, 31, 0.95) 75%);
  padding: 0.5rem;
  text-align: center;
}

.center-title {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--accent-gold-bright);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.center-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Horoscope Action Toolbar */
.export-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.btn-pdf-download {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  transition: var(--transition-smooth);
}

.btn-pdf-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Astrological Planetary Table */
.planetary-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 1rem;
}

.astro-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  text-align: left;
}

.astro-table th {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-gold-bright);
  padding: 0.5rem 0.65rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.astro-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
}

.astro-table tr:hover td {
  background: rgba(245, 158, 11, 0.05);
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #0d1326;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  display: none;
}

.autocomplete-item {
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.autocomplete-item:hover {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold-bright);
}

#horoscope-preview-area {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#horoscope-preview-area .jathagam-root {
  min-width: 720px;
}

