@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";

.flash-message {
  opacity: 0;
  transition: opacity 300ms ease-in-out;
}

.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }

:root {
  background-color: rgb(17 24 39);
  height: 100%;
}

html {
  @apply bg-gray-900;
  height: 100%;
  /* Hide scrollbar for Chrome, Safari and Opera */
  ::-webkit-scrollbar {
    display: none;
  }
  /* Hide scrollbar for IE, Edge and Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

body {
  @apply bg-gray-900;
  min-height: 100%;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  /* Enables momentum scrolling on iOS */
  -webkit-overflow-scrolling: touch;
  /* Hide scrollbar while allowing scrolling */
  overflow-y: auto;
  ::-webkit-scrollbar {
    display: none;
  }
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Show inline search spinner while server processes phx-change */
.phx-change-loading .search-spinner { display: inline; }
.phx-change-loading .search-icon { display: none; }
