/* global.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-background);
  color: var(--color-text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Hide scrollbars but keep functionality for all elements */
*::-webkit-scrollbar {
  display: none;
}
* {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  outline: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.125rem; }
}

/* Page Top Banner Gradient */
.page-top-banner {
    height: 80px;
    background: linear-gradient(120deg, #C7D2FE 0%, #BFDBFE 40%, #FEF3C7 100%);
    width: 100%;
}

/* Base states */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite linear;
  border-radius: var(--radius-sm);
  color: transparent !important;
}
.skeleton * {
  visibility: hidden;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Enhancements for Pull to Refresh UI */
.ptr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease;
  background: var(--color-background);
}
.ptr-container.active {
  height: 50px;
}
.ptr-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Empty States */
.empty-state {
  text-align: center;
  padding: var(--spacing-6) var(--spacing-2);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.empty-state-icon {
  width: 64px;
  height: 64px;
  margin-bottom: var(--spacing-3);
  color: var(--color-text-muted);
}
.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-1);
  color: var(--color-text-main);
}
.empty-state p {
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-4);
  max-width: 300px;
}

/* Utilities */
.text-primary  { color: var(--color-primary); }
.text-muted    { color: var(--color-text-muted); }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.text-sm       { font-size: 0.875rem; }
.text-xs       { font-size: 0.75rem; }
.text-lg       { font-size: 1.125rem; }
.text-xl       { font-size: 1.25rem; }
.block         { display: block; }
.mt-auto       { margin-top: auto; }
.mt-2          { margin-top: var(--spacing-2); }
.mb-2          { margin-bottom: var(--spacing-2); }
.hover\:text-primary:hover { color: var(--color-primary); }

.bg-alternate { background-color: var(--color-bg-alt); }
.section-spacing { padding: var(--spacing-6) 0; }
.pt-detail { padding-top: 100px; } /* extra padding for detail top */
