/* Marine Weather App - Compact CSS */

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #374151;
}

/* Typography - All text classes scaled down for compact display */
.text-lg { font-size: 0.95rem; }
.text-2xl { font-size: 1rem; }
.text-3xl { font-size: 1.05rem; }
.text-4xl { font-size: 1.1rem; }
.text-5xl { font-size: 1.15rem; }
.text-6xl { font-size: 1.2rem; }
.text-7xl { font-size: 1.25rem; }
.text-8xl { font-size: 1.3rem; }
.text-9xl { font-size: 2.7rem; }

.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

/* Display */
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }
.contents { display: contents; }
.hidden { display: none !important; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-3 { gap: 0.5rem; }
.gap-6 { gap: 0.75rem; }
.gap-12 { gap: 1rem; }

/* Layout */
.container { width: 100%; margin-left: auto; margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-7xl { max-width: 100%; }
.max-w-4xl { max-width: 100%; }
.max-w-2xl { max-width: 42rem; }
.max-w-xl { max-width: 36rem; }
.max-w-lg { max-width: 32rem; }
.max-w-md { max-width: 28rem; }
.max-w-sm { max-width: 24rem; }
.max-w-full { max-width: 100%; }
.w-full { width: 100%; }
.min-h-screen { min-height: 100vh; }

/* Padding - All reduced */
.px-3 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-8 { padding-left: 1rem; padding-right: 1rem; }
.px-10 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-2 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-3 { padding-top: 0.35rem; padding-bottom: 0.35rem; }
.py-4 { padding-top: 0.4rem; padding-bottom: 0.4rem; }
.py-6 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-8 { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.py-10 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-12 { padding-top: 0.85rem; padding-bottom: 0.85rem; }

/* Margin - All reduced */
.mb-4 { margin-bottom: 0.5rem; }
.mb-8 { margin-bottom: 0.75rem; }
.mb-12 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.25rem; }
.mt-4 { margin-top: 0.5rem; }

/* Colors - Text */
.text-white { color: #ffffff; }
.text-gray-700 { color: #374151; }
.text-blue-600 { color: #2563eb; }
.text-blue-800 { color: #1e40af; }
.text-blue-900 { color: #1e3a8a; }
.text-red-600 { color: #dc2626; }
.text-red-800 { color: #991b1b; }
.text-green-600 { color: #16a34a; }
.text-green-800 { color: #166534; }
.text-purple-600 { color: #9333ea; }

.hover\:text-blue-800:hover { color: #1e40af; }
.hover\:text-red-800:hover { color: #991b1b; }
.hover\:text-green-800:hover { color: #166534; }

/* Colors - Background */
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-500 { background-color: #6b7280; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-600 { background-color: #2563eb; }
.bg-green-600 { background-color: #16a34a; }
.bg-purple-600 { background-color: #9333ea; }
.bg-red-50 { background-color: #fef2f2; }
.bg-white { background-color: #ffffff; }
.bg-transparent { background-color: transparent; }

.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:bg-gray-600:hover { background-color: #4b5563; }
.hover\:bg-green-700:hover { background-color: #15803d; }
.hover\:bg-purple-700:hover { background-color: #7e22ce; }

/* Border */
.border { border-width: 1px; border-color: #d1d5db; }
.border-4 { border-width: 4px; border-color: #d1d5db; }
.border-gray-300 { border-color: #d1d5db; }
.border-collapse { border-collapse: collapse; }
.border-t { border-top-width: 1px; border-color: #d1d5db; }

/* Ensure forecast result items have visible borders */
.bg-white.p-3.border {
  border: 1px solid #000000 !important;
  background-color: #ffffff !important;
  padding: 0.75rem !important;
  margin-bottom: 0 !important;
}

/* Border radius */
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }

/* Shadow */
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }

/* Focus */
.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { outline-width: 2px; outline-style: solid; }
.focus\:ring-blue-500:focus { outline-color: #3b82f6; }
.focus\:ring-gray-400:focus { outline-color: #9ca3af; }
.focus\:ring-green-500:focus { outline-color: #22c55e; }
.focus\:ring-purple-500:focus { outline-color: #a855f7; }
.focus\:ring-offset-2:focus { outline-offset: 2px; }

/* Transitions */
.transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

/* Height */
.min-h-\[60px\] { min-height: 30px; }
.min-h-\[80px\] { min-height: 35px; }
.min-h-\[90px\] { min-height: 38px; }
.min-h-\[100px\] { min-height: 40px; }

/* Overflow */
.overflow-x-auto { overflow-x: auto; }
.min-w-full { min-width: 100%; }

/* Utilities */
.uppercase { text-transform: uppercase; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.space-x-4 { margin-right: 0.5rem; }
.space-x-4 > * + * { margin-left: 0.5rem; }
.space-y-12 > * + * { margin-top: 0.75rem; }

/* Align search criteria bullets under the "S" */
.ml-8 {
  margin-left: 1.5rem !important;
}

/* Responsive - Small screens */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:gap-6 { gap: 0.75rem; }
  .sm\:gap-12 { gap: 1rem; }
  .sm\:px-0 { padding-left: 0; padding-right: 0; }
  .sm\:px-8 { padding-left: 1rem; padding-right: 1rem; }
  .sm\:py-8 { padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .sm\:text-2xl { font-size: 1rem; }
  .sm\:text-6xl { font-size: 1.2rem; }
  .sm\:min-h-\[80px\] { min-height: 35px; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:bg-transparent { background-color: transparent; }
  .sm\:rounded-none { border-radius: 0; }
  .sm\:text-left { text-align: left; }
  .sm\:mt-6 { margin-top: 0.5rem; }
  
  /* Desktop: show Direction, hide Dir */
  .sm\:inline { display: inline !important; }
  .sm\:hidden { display: none !important; }
}

/* Responsive - Large screens */
@media (min-width: 1024px) {
  .lg\:text-9xl { font-size: 2.7rem; }
  .lg\:text-3xl { font-size: 1.05rem; }
  .lg\:text-2xl { font-size: 1rem; }
  .lg\:text-8xl { font-size: 1.3rem; }
  .lg\:text-7xl { font-size: 1.25rem; }
  .lg\:px-10 { padding-left: 1.25rem; padding-right: 1.25rem; }
  .lg\:py-10 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .lg\:py-12 { padding-top: 0.85rem; padding-bottom: 0.85rem; }
  .lg\:gap-16 { gap: 1.2rem; }
  .lg\:min-h-\[90px\] { min-height: 38px; }
  .lg\:min-h-\[100px\] { min-height: 40px; }
  .lg\:px-8 { padding-left: 1rem; padding-right: 1rem; }

  /* Constrain table width and left-justify */
  .overflow-x-auto {
    max-width: 600px;
    margin: 0;
  }
  
  table.border-collapse {
    border-collapse: collapse;
    width: auto;
  }
  
  table.border-collapse th {
    padding: 0.2rem 0.35rem !important;
    border-width: 1px !important;
  }
  
  table.border-collapse td {
    padding: 0.1rem 0.35rem !important;
    border-width: 1px !important;
  }
}

/* Mobile-specific styles (screens below 640px) */
@media (max-width: 639px) {
  html {
    font-size: 13px;
  }
  
  /* Smaller title for mobile */
  .text-9xl { font-size: 1.5rem; }
  .text-8xl { font-size: 1.3rem; }
  .text-7xl { font-size: 1.2rem; }
  .text-6xl { font-size: 1.15rem; }
  .text-5xl { font-size: 1.1rem; }
  
  /* Reduce padding on main container */
  .px-8 { padding-left: 0.75rem; padding-right: 0.75rem; }
  .py-12 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  
  /* Reduce margins */
  .mb-4 { margin-bottom: 0.4rem; }
  .mb-8 { margin-bottom: 0.6rem; }
  .mb-12 { margin-bottom: 0.8rem; }
  .mt-2 { margin-top: 0.2rem; }
  
  /* Stack buttons vertically on mobile */
  .grid-cols-1, .sm\:grid-cols-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
  
  .gap-6, .sm\:gap-6, .gap-12, .sm\:gap-12 {
    gap: 0.5rem !important;
  }
  
  /* Reduce button sizes on mobile */
  .py-4 { padding-top: 0.4rem !important; padding-bottom: 0.4rem !important; }
  .py-8 { padding-top: 0.6rem !important; padding-bottom: 0.6rem !important; }
  .px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }
  
  /* Smaller min heights for buttons */
  .min-h-\[60px\] { min-height: 32px !important; }
  .min-h-\[80px\] { min-height: 36px !important; }
  .min-h-\[90px\] { min-height: 38px !important; }
  .min-h-\[100px\] { min-height: 40px !important; }
  
  /* Mobile table adjustments - make it bigger */
  .overflow-x-auto {
    max-width: 100%;
  }
  
  table.border-collapse {
    font-size: 1.5rem;
    width: 100% !important;
  }
  
  table.border-collapse th {
    padding: 0.5rem 0.35rem !important;
    border-width: 1px !important;
    line-height: 1.4;
  }
  
  table.border-collapse td {
    padding: 0.45rem 0.35rem !important;
    border-width: 1px !important;
    line-height: 1.4;
  }
  
  /* Make wind speed column narrower */
  table.border-collapse td:last-child {
    max-width: 100%;
    overflow-wrap: break-word;
  }
  
  /* Make select boxes bigger on mobile */
  select {
    font-size: 1.3rem !important;
    padding: 0.45rem 0.35rem !important;
    line-height: 1.5;
  }
  
  /* Qualifier column - make select bigger */
  table.border-collapse td:nth-child(2) select {
    width: 100% !important;
    font-size: 1.3rem !important;
    padding: 0.45rem 0.3rem !important;
  }

  /* Wind speed column: avoid truncation */
  table.border-collapse td:last-child select {
    width: 100% !important;
    min-width: 9ch;
    white-space: nowrap;
  }
}
