/* Golf Society App — Mobile-first responsive styles */

/* Small screens (phones) */
@media (max-width: 576px) {
  body {
    font-size: 14px;
  }

  button {
    width: 100%;
    padding: 0.75em;
    font-size: 16px; /* Prevent zoom on iOS */
    margin-bottom: 0.5em;
  }

  input, textarea, select {
    width: 100%;
    padding: 0.75em;
    margin-bottom: 0.5em;
    font-size: 16px; /* Prevent zoom on iOS */
  }

  /* Ensure touch targets are at least 44x44px */
  button, input[type="submit"], input[type="button"], a.button {
    min-height: 44px;
    min-width: 44px;
  }

  table {
    font-size: 0.9em;
  }

  th, td {
    padding: 0.5em;
  }

  .card {
    padding: 0.75em;
    margin: 0.5em 0;
  }

  nav {
    flex-direction: column;
    gap: 0.5em;
  }

  nav a {
    margin-right: 0;
    margin-bottom: 0.5em;
  }

  /* Stack form fields */
  form > * {
    display: block;
    width: 100%;
    margin-bottom: 0.75em;
  }

  /* Scrollable hole-by-hole cards */
  .hole-card {
    scroll-snap-align: start;
  }

  .hole-list {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1em;
    padding: 1em 0;
  }

  .hole-card {
    flex: 0 0 100%;
    min-height: 300px;
  }
}

/* Medium screens (tablets) */
@media (min-width: 576px) and (max-width: 992px) {
  body {
    font-size: 15px;
  }

  .card {
    padding: 1.25em;
  }

  table {
    font-size: 0.95em;
  }

  /* Two-column layouts */
  .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
  }
}

/* Large screens (desktop) */
@media (min-width: 992px) {
  body {
    font-size: 16px;
    max-width: 1200px;
    margin: 0 auto;
  }

  .card {
    padding: 1.5em;
  }

  /* Three-column layout for wide screens */
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5em;
  }
}

/* Landscape orientation */
@media (orientation: landscape) and (max-height: 500px) {
  nav {
    padding: 0.5em;
  }

  .card {
    padding: 0.5em;
  }

  button, input {
    padding: 0.4em;
  }
}

/* Print styles */
@media print {
  nav {
    display: none;
  }

  .no-print {
    display: none !important;
  }

  body {
    background: white;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
