/* flowix sky — day / night / scroll journey (see flowix-sky.js) */

.fx-sky-scene {
  --fx-sky-top: #5eb3e8;
  --fx-sky-mid: #87ceeb;
  --fx-sky-bottom: #e8f4fc;
  --fx-cloud-fill: rgba(255, 255, 255, 0.92);
  --fx-cloud-shadow: rgba(255, 255, 255, 0.5);
  --fx-stars-opacity: 0;
  --fx-sky-vignette: rgba(45, 90, 135, 0);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.fx-sky-gradient {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    var(--fx-sky-top) 0%,
    var(--fx-sky-mid) 42%,
    var(--fx-sky-bottom) 100%
  );
  will-change: background;
  transition: background 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.fx-sky-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse 120% 80% at 50% 100%, var(--fx-sky-vignette), transparent 55%);
  pointer-events: none;
}

.fx-sky-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: var(--fx-stars-opacity);
  pointer-events: none;
}

.fx-sky-star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
  animation: fx-star-twinkle ease-in-out infinite;
}

@keyframes fx-star-twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

/* Night + journey: clouds pick up moonlight */
body.fx-sky-night .fx-cloud,
body.fx-sky-journey.fx-sky-phase-night .fx-cloud,
.fx-sky-scene[data-phase="night"] .fx-cloud,
.fx-sky-scene[data-phase="sunset"] .fx-cloud {
  background: var(--fx-cloud-fill);
  box-shadow: 0 10px 36px var(--fx-cloud-shadow);
}

.fx-sky-scene .fx-cloud {
  background: var(--fx-cloud-fill);
  box-shadow: 0 12px 40px var(--fx-cloud-shadow);
  transition: background 0.55s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

body.fx-sky-scrolling .fx-sky-star {
  animation-play-state: paused;
}

/* Landing: content above sky */
body.fx-landing.fx-sky-journey {
  min-height: 100vh;
}

/* Settings page cards */
.fx-sky-settings-grid {
  display: grid;
  gap: 16px;
  max-width: 640px;
}

.fx-sky-option {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--fx-radius-ui, 3px);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: rgba(255, 255, 255, 0.85);
}

.fx-sky-option:hover {
  border-color: rgba(21, 108, 194, 0.35);
}

.fx-sky-option.is-selected {
  border-color: #156cc2;
  box-shadow: 0 0 0 1px rgba(21, 108, 194, 0.25);
}

.fx-sky-option input {
  margin-top: 4px;
  accent-color: #156cc2;
}

.fx-sky-preview {
  width: 100%;
  height: 56px;
  border-radius: 3px;
  margin-top: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.fx-sky-preview--day {
  background: linear-gradient(180deg, #5eb3e8 0%, #b8dff5 50%, #e8f4fc 100%);
}

.fx-sky-preview--night {
  background: linear-gradient(180deg, #0a1628 0%, #152238 45%, #1e2d4a 100%);
  position: relative;
  overflow: hidden;
}

.fx-sky-preview--journey {
  background: linear-gradient(180deg, #5eb3e8 0%, #e8a87c 42%, #5c3d6e 68%, #0a1628 100%);
}

.fx-sky-preview--cycle {
  background: linear-gradient(
    90deg,
    #5eb3e8 0%,
    #e8c4a0 22%,
    #c87858 44%,
    #1a2a42 66%,
    #5eb3e8 100%
  );
}

/* Sky phases only change the background — nav, buttons, and cards keep daytime styling */

body.fx-sky-night.fx-app-page .fx-nav {
  background: rgba(255, 255, 255, 0.92) !important;
}

/* Gear — top right dashboard */
.fx-settings-gear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin-right: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #3d4f5f;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.fx-settings-gear:hover {
  background: #fff;
  border-color: rgba(21, 108, 194, 0.35);
  color: #156cc2;
}

.fx-settings-gear svg {
  width: 20px;
  height: 20px;
}

.fx-settings-gear.is-active {
  background: #156cc2;
  border-color: #156cc2;
  color: #fff;
}

/* Time-of-day slider */
.fx-sky-time-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.fx-sky-time-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.fx-sky-time-header strong {
  font-size: 15px;
}

.fx-sky-time-meta {
  text-align: right;
  font-size: 13px;
  color: #156cc2;
  font-weight: 600;
}

.fx-sky-time-meta span {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #86868b;
}

.fx-sky-time-slider-wrap {
  position: relative;
  padding: 8px 0 4px;
}

.fx-sky-time-slider {
  width: 100%;
  height: 8px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #5eb3e8 0%,
    #e8c4a0 35%,
    #c87858 55%,
    #1a2a42 100%
  );
  outline: none;
  cursor: pointer;
}

.fx-sky-time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #156cc2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: grab;
}

.fx-sky-time-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #156cc2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: grab;
}

.fx-sky-time-slider:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fx-sky-time-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #86868b;
  margin-top: 6px;
}

#sky-time-preview {
  width: 100%;
  height: 48px;
  border-radius: 3px;
  margin-top: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .fx-sky-star {
    animation: none;
    opacity: 0.7;
  }
}
