/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Global styles to prevent horizontal scrolling */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.8s ease-out;
}

/* Modal styles */
dialog.modal {
  padding: 0;
  margin: auto;
  border: none;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

dialog.modal::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

dialog.modal[open] {
  animation: modal-slide-in 0.3s ease-out;
}

@keyframes modal-slide-in {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Prevent body scroll when modal is open */
body.overflow-hidden {
  overflow: hidden;
}

/* Flash notification countdown animation */
@keyframes countdown {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

.animate-countdown {
  animation-name: countdown;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

/* Weather cloud cover patterns */
.cloud-few {
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    rgba(125, 211, 252, 0.4) 8px,
    rgba(125, 211, 252, 0.4) 10px
  );
  background-color: rgba(125, 211, 252, 0.2);
}

.cloud-sct {
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 5px,
    rgba(56, 189, 248, 0.5) 5px,
    rgba(56, 189, 248, 0.5) 7px
  );
  background-color: rgba(56, 189, 248, 0.3);
}

.cloud-bkn {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(14, 165, 233, 0.6),
      rgba(14, 165, 233, 0.6) 2px,
      transparent 2px,
      transparent 6px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(14, 165, 233, 0.6),
      rgba(14, 165, 233, 0.6) 2px,
      transparent 2px,
      transparent 6px
    );
  background-color: rgba(14, 165, 233, 0.4);
}

.cloud-ovc {
  background: linear-gradient(
    to bottom,
    rgba(71, 85, 105, 0.95),
    rgba(51, 65, 85, 0.98)
  );
}

.dark .cloud-few {
  background-color: rgba(125, 211, 252, 0.15);
}

.dark .cloud-sct {
  background-color: rgba(56, 189, 248, 0.2);
}

.dark .cloud-bkn {
  background-color: rgba(14, 165, 233, 0.35);
}

.dark .cloud-ovc {
  background: linear-gradient(
    to bottom,
    rgba(148, 163, 184, 0.85),
    rgba(100, 116, 139, 0.9)
  );
}
