/* ==========================================================================
   Sunrise & Sunset Tool - Tool-Specific Styles
   Extends global .tool-container grid layout (380px sidebar + 1fr map)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Sidebar Content - no extra padding, global .tool-section cards handle it
   -------------------------------------------------------------------------- */
.sidebar-content label {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  margin-top: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.sidebar-content label:first-of-type {
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   Date Navigation
   -------------------------------------------------------------------------- */
.date-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.date-nav input[type="date"] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

.date-nav button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.date-nav button:hover {
  background: var(--hover-bg);
  border-color: var(--primary);
}

/* --------------------------------------------------------------------------
   Result Card
   -------------------------------------------------------------------------- */
.result-card {
  border: 2px solid #f59e0b;
  border-radius: var(--radius-lg);
  padding: 20px;
  background: rgba(245, 158, 11, 0.08);
}

.result-location {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.result-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Sun times grid */
.sun-times-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.sun-time-item {
  text-align: center;
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.sun-time-item.sunrise {
  border-left: 3px solid #f97316;
}

.sun-time-item.sunset {
  border-left: 3px solid #8b5cf6;
}

.sun-time-item.dawn {
  border-left: 3px solid #fb923c;
}

.sun-time-item.dusk {
  border-left: 3px solid #a78bfa;
}

.sun-time-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.sun-time-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

/* Day length highlight */
.day-length {
  text-align: center;
  padding: 12px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.day-length-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.day-length-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

/* Golden hour & solar noon */
.extra-times {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.extra-time-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.extra-time-item .label {
  color: var(--text-muted);
}

.extra-time-item .value {
  font-weight: 600;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Sun Details Section
   -------------------------------------------------------------------------- */
.sun-details-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sun-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.sun-detail-item .label {
  color: var(--text-muted);
}

.sun-detail-item .value {
  font-weight: 600;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Moon Section
   -------------------------------------------------------------------------- */
.moon-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.moon-phase-display {
  text-align: center;
  margin-bottom: 12px;
}

.moon-phase-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 4px;
}

.moon-phase-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.moon-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.moon-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.moon-detail-item .label {
  color: var(--text-muted);
}

.moon-detail-item .value {
  font-weight: 600;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Tool Info / Attribution
   -------------------------------------------------------------------------- */
.tool-info {
  background-color: var(--glass);
  border-radius: var(--radius-lg);
  padding: 14px;
  border: 1px solid var(--border);
}

.tool-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 8px 0;
  line-height: 1.5;
}

.tool-info p:last-child {
  margin-bottom: 0;
}

.tool-info a {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Terms Section
   -------------------------------------------------------------------------- */
.terms-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.term-item {
  padding: 10px 12px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.term-item strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 2px;
}

.term-item span {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Button Groups
   -------------------------------------------------------------------------- */
.button-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Map - extend height from global 600px
   -------------------------------------------------------------------------- */
#map {
  min-height: 600px;
}

/* --------------------------------------------------------------------------
   Mobile FAB
   -------------------------------------------------------------------------- */
.fab {
  display: none;
  width: 56px;
  height: 56px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 9999;
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .tool-sidebar.collapsed .sidebar-content {
    display: none;
  }

  .fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 20px;
    right: 20px;
  }
}

@media (max-width: 600px) {
  .sun-times-grid {
    grid-template-columns: 1fr;
  }

  .day-length-value {
    font-size: 1.25rem;
  }
}
