/* ===== Hora UI: Celestial Glassmorphism ===== */
:root {
  --hc-font: 'Outfit', system-ui, -apple-system, sans-serif;
  --hc-bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  --hc-text-main: #1e293b;
  --hc-text-muted: #64748b;
  --hc-primary: #6366f1;
  --hc-primary-hover: #4f46e5;
  --hc-accent: #f43f5e;

  --hc-glass-bg: rgba(255, 255, 255, 0.7);
  --hc-glass-border: rgba(255, 255, 255, 0.5);
  --hc-glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --hc-card-radius: 24px;
  --hc-input-radius: 12px;
}

.hc-wrap {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 80vh;
  padding: 40px 20px;
  font-family: var(--hc-font);
  color: var(--hc-text-main);
  box-sizing: border-box;
}

/* Background overlay if needed on the page */
.hc-wrap::before {
  display: none;
  /* Let the theme decide background, or uncomment for fixed bg */
  /* content: ""; position: fixed; inset: 0; background: var(--hc-bg-gradient); z-index: -1; */
}

/* --- Typography --- */
.hc-wrap h1,
.hc-wrap h2,
.hc-wrap h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

/* --- Layout Components --- */

/* Glass Card Mixin */
.hc-card,
.hc-toolbar {
  background: var(--hc-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--hc-glass-border);
  box-shadow: var(--hc-glass-shadow);
  border-radius: var(--hc-card-radius);
}

/* Toolbar */
/* Toolbar */
.hc-toolbar {
  padding: 24px;
  /* Reduced from 32px */
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* Reduced from 24px */
}

/* Sections */
.hc-section-location {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* Match the bottom row grid */
  gap: 16px;
  align-items: end;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.hc-section-location>.hc-field:first-child {
  grid-column: span 3;
  /* Search takes 3/4 width */
}

.hc-section-location>.hc-field:last-child {
  grid-column: span 1;
  /* Quick Select takes 1/4 width */
}

.hc-section-combined {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* 4 items in one row */
  gap: 16px;
  align-items: end;
}

/* Fields */
.hc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.hc-field label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  /* Darker for better visibility */
}

.hc-field input,
.hc-field select {
  width: 100%;
  height: 48px;
  /* Fixed height for alignment */
  padding: 0 16px;
  /* Vertical centering via line-height/flex is safer, but padding 0 + line-height = height works nicely */
  line-height: 46px;
  /* height - borders */
  border: 1px solid #cbd5e1;
  border-radius: var(--hc-input-radius);
  background: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  font-family: var(--hc-font);
  color: #334155;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  appearance: none;
  display: block;
}

.hc-field select {
  padding-right: 32px;
  /* Space for arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

.hc-field input:focus,
.hc-field select:focus {
  outline: none;
  border-color: var(--hc-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  background-color: #fff;
}

/* Input Group (Search + Button) */
.hc-input-group {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.hc-input-group input {
  padding-right: 50px;
  width: 100%;
}

.hc-btn-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--hc-text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.hc-btn-icon:hover {
  color: var(--hc-primary);
  background: rgba(99, 102, 241, 0.1);
}

.hc-btn-icon svg {
  width: 20px;
  height: 20px;
}

/* Buttons */
.hc-btn {
  padding: 14px 32px;
  border-radius: var(--hc-input-radius);
  font-family: var(--hc-font);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hc-btn-primary {
  background: linear-gradient(135deg, var(--hc-primary), var(--hc-primary-hover));
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3), 0 0 0 2px rgba(255, 255, 255, 0.2) inset;
}

.hc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.3) inset;
}

.hc-btn-outline {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: var(--hc-text-muted);
}

.hc-btn-outline:hover {
  border-color: var(--hc-primary);
  color: var(--hc-primary);
  background: rgba(99, 102, 241, 0.05);
}

/* Suggest Dropdown */
.hc-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  z-index: 50;
  padding: 8px 0;
}

.hc-suggest button {
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  color: #334155;
  transition: all 0.1s;
}

.hc-suggest button:hover {
  background: #f1f5f9;
  color: var(--hc-primary);
}

/* Actions & Status */
.hc-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}

#hc-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.hc-muted {
  font-size: 0.9rem;
  color: var(--hc-text-muted);
  line-height: 1.5;
}

.hc-links {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.4);
  padding: 6px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
}

.hc-nav-link {
  padding: 10px 24px;
  border-radius: 99px;
  text-decoration: none;
  color: var(--hc-text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.hc-nav-link:hover {
  color: var(--hc-text-main);
  background: rgba(255, 255, 255, 0.6);
}

.hc-nav-link.active {
  background: white;
  color: var(--hc-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Result Grid */
.hc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.hc-card {
  padding: 24px;
  /* Matches Toolbar */
}

/* Result Info Text */
.hc-result-info {
  text-align: center;
  margin-bottom: 24px;
  font-size: 1rem;
}

.hc-title {
  display: flex;
  flex-direction: column;
  /* Stack title and time */
  align-items: center;
  /* Center align */
  justify-content: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 16px;
  text-align: center;
}

.hc-title h3 {
  font-size: 1.25rem;
  margin: 0 0 4px 0;
  /* Add small gap below title */
  color: var(--hc-text-main);
  font-weight: 800;
}

/* Table to Grid Refactor */
.hc-table {
  width: 100%;
}

.hc-table-header,
.hc-table-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  align-items: center;
  padding: 10px 16px;
  text-align: center;
  /* Default center for time columns */
}

.hc-table-header .hc-col:first-child,
.hc-table-row .hc-col:first-child {
  text-align: left;
  /* Left align Planet column */
  padding-left: 8px;
  /* Slight indent */
}

.hc-table-header {
  margin-bottom: 8px;
  /* Space between header and rows */
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.hc-table-header .hc-col {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--hc-text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.hc-table-row {
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  transition: background 0.2s;
}

.hc-col {
  font-size: 1rem;
  font-weight: 500;
}

.hc-table-row:hover {
  background: rgba(255, 255, 255, 0.6);
}

/* Highlight Current Row */
.hc-table-row.hc-now {
  background: #fff !important;
  color: var(--hc-primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
  font-weight: 700;
  position: relative;
}

.hc-now .hc-col:first-child::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--hc-primary);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
  animation: hc-blink 2s infinite ease-in-out;
}

@keyframes hc-blink {

  0%,
  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }

  50% {
    opacity: 0.5;
    transform: translateY(-50%) scale(0.8);
  }
}

/* Planet Badges */
.hc-planet {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.hc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Planet Colors */
/* Sun */
.hc-planet-sun .hc-dot {
  background: #f59f0b;
  box-shadow: 0 0 10px rgba(245, 159, 11, 0.6);
}

/* Moon */
.hc-planet-moon .hc-dot {
  background: #94a3b8;
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.6);
}

/* Mars */
.hc-planet-mars .hc-dot {
  background: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

/* Mercury */
.hc-planet-mercury .hc-dot {
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

/* Jupiter */
.hc-planet-jupiter .hc-dot {
  background: #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
}

/* Venus */
.hc-planet-venus .hc-dot {
  background: #ec4899;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.6);
}

/* Saturn */
.hc-planet-saturn .hc-dot {
  background: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}


/* Responsive */
@media (max-width: 900px) {
  .hc-section-location {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hc-section-combined {
    grid-template-columns: 1fr 1fr;
    /* 2x2 grid on medium screens */
  }
}

@media (max-width: 600px) {
  .hc-wrap {
    padding: 20px 12px;
  }

  .hc-toolbar {
    padding: 20px;
  }

  .hc-section-combined {
    grid-template-columns: 1fr;
    /* Stack on mobile */
  }

  .hc-actions button {
    width: 100%;
  }

  .hc-grid {
    grid-template-columns: 1fr;
  }
}