/**
 * Styles for Brayden Gourlay's 3D Model Viewer app.
 */

 /* ---- Viewer page container ---- */
.viewer-page {
  margin: 0;
  overflow: hidden;
  height: 100dvh;
  background: #111;
  color: var(--modal-text, #eee);
  font-family: var(--font, system-ui, sans-serif);
}

/* ---- Top navigation bar ---- */
.viewer-top {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.5rem;
  background: color-mix(in srgb, var(--modal-bg) 0%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--modal-border, rgba(0,0,0,0.08));
  transition: background 0.2s;
}

.back-link {
  padding: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s, background 0.2s;
}
.back-link:hover {
  opacity: 1;
  background: rgba(127, 127, 127, 0.15);
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: var(--option-bg, #333);
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

/* ---- Model viewport ---- */
#container {
  position: absolute;
  inset: 0;
}

#loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #111;
  color: #ccc;
  font-size: 1.1rem;
  z-index: 10;
}

/* ---- Animations pop-up panel ---- */
#animations {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 20;
}

#animations-toggle {
  background: var(--modal-bg);
  color: var(--modal-text);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.55rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  backdrop-filter: blur(8px);
  transition: scale 0.2s ease;
}

#animations-toggle:hover {
  scale: 1.05;
}

#animations-menu {
  max-height: 0;
  overflow: hidden;
  background: var(--modal-bg);
  color: var(--modal-text);
  border-radius: 12px;
  margin-top: 0.5rem;
  padding: 0 0.75rem;
  backdrop-filter: blur(10px);
  transition: max-height 0.2s ease;
}

#animations-menu.open {
  max-height: 260px;
  padding: 0.75rem;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.1);
}

#animations-menu label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.92rem;
  cursor: pointer;
}

#animations-menu input {
  accent-color: var(--option-active, #7c5cff);
}