:root {
  --orange: #ff7e00;
  --nav-height: 7vh;
}

/* light/dark theme base */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-color: white;
}
[data-theme="dark"] body {
  background-color: black;
}

.titulo {
  color: black;
  border-color: black !important;
  margin: 0;
}
[data-theme="dark"] .titulo {
  color: white;
  border-color: white !important;
}

[data-theme="dark"] .table {
  color: white;
  border-color: darkgray !important;
}
[data-theme="dark"] .table thead {
  border-color: darkgray;
}

[data-theme="dark"] .card {
  background-color: dimgray;
  color: black;
}

[data-theme="dark"] .nav-link {
  background-color: dimgray;
}

[data-theme="dark"] .nav-link.active {
  color: black !important;
}

.card {
  margin: 0 !important;
}

.card-body h6 {
  color: gray;
}

[data-theme="dark"] .card-body {
  background-color: var(--sidebar-secondary-bg-color);
}

[data-theme="dark"] .card-body h6 {
  color: lightgray;
}

[data-theme="dark"] .card-body h5,
[data-theme="dark"] .card-body h3,
[data-theme="dark"] .card-body label {
  color: lightgray;
}

[data-theme="dark"] .card-footer {
  background-color: #343a40 !important;
}

[data-theme="dark"] .app-link-secondary {
  color: white !important;
}

/* overlay (still relevant) */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 998;
  opacity: 0;
  transition: all 0.5s ease-in-out;
}

.overlay.active {
  display: block;
}

/* Button bar layout */
.button-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Icon + Label buttons */
.btn-action {
  background: transparent;
  border: 1px solid #ccc;
  font-size: 0.9rem;
  color: var(--color-text, #333);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 5px;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
}

.btn-action:hover {
  background-color: #f0f0f0;
  color: var(--color-heading, #ff7e00);
  cursor: pointer;
}

.btn-action i {
  font-size: 1.1rem;
}

/* Emphasis button like Registrar */
.btn-action.highlight {
  background-color: var(--color-heading, #ff7e00);
  border-color: transparent;
  color: white;
}

.btn-action.highlight:hover {
  background-color: #e56f00;
}

/* Dark mode support */
[data-theme="dark"] .btn-action {
  border-color: #555;
  color: var(--color-text, #ccc);
}

[data-theme="dark"] .btn-action:hover {
  background-color: #444;
  color: var(--color-heading, #0077ff);
}

[data-theme="dark"] .btn-action.highlight {
  background-color: var(--color-heading, #0077ff);
  color: white;
}

[data-theme="dark"] .btn-action.highlight:hover {
  background-color: #0063e0;
}

/* Custom title container */
.titulo-container {
  text-align: center;
  border-bottom: 1px solid;
  padding-bottom: 0.5rem;
}

/* Button bar (previously using Bootstrap flex utils) */
.button-bar-custom {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 0.5rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.button-bar-custom::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

/* Custom date form styling */
.date-form {
  display: flex;
  align-items: center;
}

/* Custom input spacing */
.date-input {
  margin-right: 0.5rem;
}

@media screen and (min-width: 1000px) {
  .button-bar-custom {
    justify-content: left;
  }
}

/*-----------------------------
BOTTOM NAVIGATION FOCUS EFFECTS
-------------------------------*/

/* Focus styles for bottom nav links */
#bottom-nav a:focus,
#bottom-nav .submenu-wrapper a:focus {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Enhanced focus for keyboard navigation */
#bottom-nav a:focus-visible,
#bottom-nav .submenu-wrapper a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  background-color: rgba(255, 126, 0, 0.1);
  transform: scale(1.05);
  transition: all 0.2s ease-in-out;
}

/* Focus states for submenu */
#bottom-nav .submenu a:focus,
#bottom-nav .submenu a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  background-color: rgba(255, 126, 0, 0.15);
  border-radius: 4px;
}

/* Active/pressed state */
#bottom-nav a:active {
  transform: scale(0.95);
  background-color: rgba(255, 126, 0, 0.2);
}

/* Hover effects enhancement */
#bottom-nav a:hover:not(.active) {
  background-color: rgba(255, 126, 0, 0.1);
  transform: translateY(-2px);
  transition: all 0.2s ease-in-out;
}

/* Dark theme focus adjustments */
[data-theme="dark"] #bottom-nav a:focus,
[data-theme="dark"] #bottom-nav .submenu-wrapper a:focus {
  outline-color: #fff;
}

[data-theme="dark"] #bottom-nav a:focus-visible,
[data-theme="dark"] #bottom-nav .submenu-wrapper a:focus-visible {
  outline-color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] #bottom-nav .submenu a:focus,
[data-theme="dark"] #bottom-nav .submenu a:focus-visible {
  outline-color: #fff;
  background-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] #bottom-nav a:active {
  background-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] #bottom-nav a:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  #bottom-nav a,
  #bottom-nav .submenu-wrapper a {
    transition: none;
    transform: none !important;
  }

  #bottom-nav a:hover:not(.active) {
    transform: none;
  }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  #bottom-nav a:focus-visible {
    outline-width: 4px;
    outline-offset: 4px;
  }

  #bottom-nav a {
    min-height: 44px; /* Minimum touch target size */
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  #bottom-nav a:focus,
  #bottom-nav a:focus-visible {
    outline: 3px solid currentColor;
    background-color: transparent;
  }
}
