/* Mobile-first responsive design */
html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Focus styles */
.btn:focus, 
.btn:active:focus, 
.btn-link.nav-link:focus, 
.form-control:focus, 
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #28a745;
}

/* Layout */
html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* Footer */
.footer {
  background-color: #f8f9fa;
  padding: 1.5rem 0;
  border-top: 1px solid #dee2e6;
}

/* Form utilities */
.form-floating > .form-control-plaintext::placeholder, 
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, 
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Mobile optimizations */
@media (max-width: 576px) {
  html {
    font-size: 13px;
  }

  body {
    margin-bottom: 0;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .card-body {
    padding: 1rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 0.375rem;
  }

  .btn-lg {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn {
    padding: 0.75rem 1rem;
    min-height: 44px;
    min-width: 44px;
  }

  .form-control,
  .form-select {
    font-size: 16px;
    padding: 0.75rem 0.5rem;
  }
}

/* Performance: lazy load images */
img {
  max-width: 100%;
  height: auto;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Prevent zoom on input focus */
@media (max-width: 576px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}
