/*
 * 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.
 */

/*= require devise */

/* Header and Logo Styling */
.logo-container {
  transition: opacity 0.2s ease-in-out;
}

.logo-container:hover {
  opacity: 0.9;
}

/* Keep logo as original - no filters applied */
.logo-medmba {
  transition: opacity 0.2s ease-in-out;
}

.logo-medmba:hover {
  opacity: 0.9;
}

/* Black header navigation styling */
nav.header-nav {
  background-color: #000000;
  border-color: #374151; /* Dark gray border */
}

/* Mobile Navigation Styles */
/* Ensure mobile menu is above other content */
[data-mobile-nav-target="menu"] {
  max-width: 80vw;
}

/* Smooth transitions for mobile menu */
[data-mobile-nav-target="menu"],
[data-mobile-nav-target="overlay"] {
  transition-property: transform, opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Touch-friendly tap targets for mobile */
@media (max-width: 640px) {
  /* Ensure minimum tap target size of 44x44px for mobile */
  nav a,
  nav button {
    min-height: 44px;
    min-width: 44px;
  }

  /* Improve spacing for mobile navigation items */
  [data-mobile-nav-target="menu"] nav a {
    padding: 0.75rem 1rem;
  }

  /* Make logo smaller on mobile */
  .logo-medmba {
    max-height: 40px;
  }

  /* Prevent horizontal scroll on mobile */
  body {
    overflow-x: hidden;
  }
}

/* Tablet and larger screens */
@media (min-width: 641px) {
  /* Hide mobile menu on larger screens */
  [data-mobile-nav-target="menu"],
  [data-mobile-nav-target="overlay"] {
    display: none !important;
  }
}

/* Accessibility: Focus states for keyboard navigation */
nav button:focus,
nav a:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Prevent layout shift when mobile menu opens */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Mobile-specific improvements for common UI patterns */
@media (max-width: 640px) {
  /* Improve button spacing on mobile */
  .space-x-3 > * + * {
    margin-left: 0.5rem !important;
  }

  /* Stack buttons vertically on very small screens */
  @media (max-width: 480px) {
    .md\:mt-0.md\:ml-4 {
      margin-top: 1rem;
      margin-left: 0;
    }

    /* Make action buttons full width on mobile */
    .inline-flex.items-center.px-4 {
      width: 100%;
      justify-content: center;
    }
  }

  /* Improve table responsiveness */
  table {
    font-size: 0.875rem;
  }

  table th,
  table td {
    padding: 0.5rem 0.75rem;
  }

  /* Improve card spacing on mobile */
  .p-6 {
    padding: 1rem;
  }

  /* Reduce heading sizes on mobile */
  h1 {
    font-size: 1.875rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  /* Improve grid spacing on mobile */
  .gap-6 {
    gap: 1rem;
  }

  .gap-8 {
    gap: 1.5rem;
  }
}

/* Ensure charts are responsive */
canvas {
  max-width: 100%;
  height: auto !important;
}

/* Improve touch targets for links and buttons */
@media (hover: none) and (pointer: coarse) {
  a, button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
