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

/* Import Design System - These should be loaded first */
@import "design_system/colors";
@import "design_system/typography";
@import "design_system/spacing";

/* Import Components */
@import "components/buttons";
@import "components/cards";
@import "components/alerts";
@import "components/navigation";
@import "components/loyalty_card";
@import "components/mobile_nav_fix";

/* Base Styles */
* {
  box-sizing: border-box;
}

/* Screen Reader Only Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.not-sr-only {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Focus Styles */
.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Skip Link Styles */
.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  background-color: var(--color-primary-600);
  color: white;
  padding: var(--space-2);
  border-bottom-right-radius: var(--radius-lg);
  transform: translateY(-100%);
  transition: transform 0.2s ease;
  z-index: 50;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeOutScale {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
}

/* Form Elements - Enhanced */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  transition: var(--transition-colors);
}

input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover {
  border-color: var(--color-border-hover);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Checkbox and Radio Enhanced */
input[type="checkbox"],
input[type="radio"] {
  width: var(--space-4);
  height: var(--space-4);
  cursor: pointer;
}

/* Mobile Touch Target Enhancement */
@media (max-width: 768px) {
  button,
  a,
  input,
  select,
  textarea {
    min-height: 44px;
  }
}
