/* =========================================================
   ALUMINIUMGLASS USER APP
   BASE CSS
   File:
   /home/jqkmqvml/user_app/assets/css/base.css

   Purpose:
   - Global typography
   - Body foundation
   - Default page appearance
   - Common utility classes
   - Accessibility foundations
   - Shared text/state helpers

   Load order:
   variables.css
   reset.css
   base.css
   layout.css
   ...
   ========================================================= */


/* =========================================================
   01. ROOT FOUNDATION
   ========================================================= */

:root {
  color-scheme: light;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--color-background);
}

body {
  min-width: 320px;
  min-height: 100vh;

  background: var(--color-background);
  color: var(--color-text);

  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  text-rendering: optimizeLegibility;

  overflow-x: hidden;
}


/* =========================================================
   02. DARK THEME FOUNDATION
   ========================================================= */

[data-theme="dark"] {
  color-scheme: dark;
}

[data-theme="dark"] body {
  background: var(--color-background);
  color: var(--color-text);
}


/* =========================================================
   03. TYPOGRAPHY
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-text);

  font-family: var(--font-family);

  line-height: var(--line-height-tight);

  text-wrap: balance;
}

h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
}

h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
}

h3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
}

h4 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
}

h5 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

h6 {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
}

p {
  color: var(--color-text);
  line-height: var(--line-height-relaxed);
}

strong,
b {
  font-weight: var(--font-weight-semibold);
}

small {
  font-size: var(--font-size-sm);
}

em {
  font-style: italic;
}


/* =========================================================
   04. TEXT HELPERS
   ========================================================= */

.text-primary {
  color: var(--color-primary) !important;
}

.text-secondary {
  color: var(--color-secondary) !important;
}

.text-muted {
  color: var(--color-text-muted) !important;
}

.text-success {
  color: var(--color-success) !important;
}

.text-warning {
  color: var(--color-warning) !important;
}

.text-danger {
  color: var(--color-danger) !important;
}

.text-info {
  color: var(--color-info) !important;
}

.text-inverse {
  color: var(--color-text-inverse) !important;
}

.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

.text-right {
  text-align: right !important;
}

.text-uppercase {
  text-transform: uppercase !important;
}

.text-lowercase {
  text-transform: lowercase !important;
}

.text-capitalize {
  text-transform: capitalize !important;
}

.text-nowrap {
  white-space: nowrap !important;
}

.text-break {
  overflow-wrap: anywhere;
  word-break: break-word;
}


/* =========================================================
   05. LINKS
   ========================================================= */

a {
  color: var(--color-primary);
  transition:
    color var(--transition-fast),
    opacity var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
}

a:active {
  color: var(--color-primary-active);
}

a:focus-visible {
  border-radius: var(--radius-sm);
}


/* =========================================================
   06. IMAGES
   ========================================================= */

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

img[width],
img[height] {
  max-width: 100%;
}

img,
svg,
video {
  user-select: none;
}


/* =========================================================
   07. BUTTON / INTERACTION FOUNDATION
   ========================================================= */

button,
a,
input,
select,
textarea,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid var(--focus-ring-color);
  outline-offset: 2px;
}


/* =========================================================
   08. FORM FOUNDATION
   ========================================================= */

input,
textarea,
select {
  color: var(--color-text);
  background-color: var(--color-surface);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.65;
}


/* =========================================================
   09. PLACEHOLDER
   ========================================================= */

::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}


/* =========================================================
   10. SELECTION
   ========================================================= */

::selection {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}


/* =========================================================
   11. SCROLLBAR
   ========================================================= */

html {
  scrollbar-width: thin;
  scrollbar-color:
    var(--color-border-strong)
    var(--color-background);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-background);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border: 2px solid var(--color-background);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}


/* =========================================================
   12. PAGE ROOT
   ========================================================= */

#app,
[data-app] {
  width: 100%;
  min-height: 100vh;
}

.app {
  position: relative;
  width: 100%;
  min-height: 100vh;
}


/* =========================================================
   13. COMMON SURFACES
   ========================================================= */

.surface {
  background: var(--color-surface);
  color: var(--color-text);
}

.surface-muted {
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.surface-elevated {
  background: var(--color-surface-elevated);
  color: var(--color-text);
}


/* =========================================================
   14. DIVIDERS
   ========================================================= */

.divider {
  width: 100%;
  height: 1px;

  margin: 0;

  background: var(--color-border);

  border: 0;
}

.divider--strong {
  background: var(--color-border-strong);
}


/* =========================================================
   15. VISIBILITY UTILITIES
   ========================================================= */

.hidden {
  display: none !important;
}

.invisible {
  visibility: hidden !important;
}

.visible {
  visibility: visible !important;
}

.opacity-0 {
  opacity: 0 !important;
}

.opacity-50 {
  opacity: 0.5 !important;
}

.opacity-75 {
  opacity: 0.75 !important;
}

.opacity-100 {
  opacity: 1 !important;
}


/* =========================================================
   16. DISPLAY UTILITIES
   ========================================================= */

.block {
  display: block !important;
}

.inline {
  display: inline !important;
}

.inline-block {
  display: inline-block !important;
}

.flex {
  display: flex !important;
}

.inline-flex {
  display: inline-flex !important;
}

.grid {
  display: grid !important;
}


/* =========================================================
   17. FLEX UTILITIES
   ========================================================= */

.flex-row {
  flex-direction: row !important;
}

.flex-column {
  flex-direction: column !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.flex-nowrap {
  flex-wrap: nowrap !important;
}

.items-start {
  align-items: flex-start !important;
}

.items-center {
  align-items: center !important;
}

.items-end {
  align-items: flex-end !important;
}

.justify-start {
  justify-content: flex-start !important;
}

.justify-center {
  justify-content: center !important;
}

.justify-end {
  justify-content: flex-end !important;
}

.justify-between {
  justify-content: space-between !important;
}

.justify-around {
  justify-content: space-around !important;
}


/* =========================================================
   18. WIDTH UTILITIES
   ========================================================= */

.w-full {
  width: 100% !important;
}

.w-auto {
  width: auto !important;
}

.max-w-full {
  max-width: 100% !important;
}


/* =========================================================
   19. HEIGHT UTILITIES
   ========================================================= */

.h-full {
  height: 100% !important;
}

.h-auto {
  height: auto !important;
}

.min-h-screen {
  min-height: 100vh !important;
}


/* =========================================================
   20. OVERFLOW UTILITIES
   ========================================================= */

.overflow-hidden {
  overflow: hidden !important;
}

.overflow-auto {
  overflow: auto !important;
}

.overflow-x-auto {
  overflow-x: auto !important;
}

.overflow-y-auto {
  overflow-y: auto !important;
}


/* =========================================================
   21. POSITION UTILITIES
   ========================================================= */

.relative {
  position: relative !important;
}

.absolute {
  position: absolute !important;
}

.fixed {
  position: fixed !important;
}

.sticky {
  position: sticky !important;
}


/* =========================================================
   22. SPACING — COMMON
   ========================================================= */

.mt-0 {
  margin-top: 0 !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.ml-0 {
  margin-left: 0 !important;
}

.mr-0 {
  margin-right: 0 !important;
}

.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}

.p-0 {
  padding: 0 !important;
}


/* =========================================================
   23. RADIUS UTILITIES
   ========================================================= */

.rounded-none {
  border-radius: 0 !important;
}

.rounded-sm {
  border-radius: var(--radius-sm) !important;
}

.rounded {
  border-radius: var(--radius-md) !important;
}

.rounded-lg {
  border-radius: var(--radius-lg) !important;
}

.rounded-xl {
  border-radius: var(--radius-xl) !important;
}

.rounded-full {
  border-radius: var(--radius-full) !important;
}


/* =========================================================
   24. SHADOW UTILITIES
   ========================================================= */

.shadow-none {
  box-shadow: none !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow {
  box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

.shadow-xl {
  box-shadow: var(--shadow-xl) !important;
}


/* =========================================================
   25. CURSOR
   ========================================================= */

.cursor-pointer {
  cursor: pointer !important;
}

.cursor-default {
  cursor: default !important;
}

.cursor-not-allowed {
  cursor: not-allowed !important;
}


/* =========================================================
   26. USER SELECT
   ========================================================= */

.select-none {
  user-select: none !important;
}

.select-text {
  user-select: text !important;
}


/* =========================================================
   27. SCREEN READER ONLY
   ========================================================= */

.sr-only {
  position: absolute !important;

  width: 1px !important;
  height: 1px !important;

  padding: 0 !important;
  margin: -1px !important;

  overflow: hidden !important;

  white-space: nowrap !important;

  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
}

.sr-only-focusable:focus,
.sr-only-focusable:active {
  position: static !important;

  width: auto !important;
  height: auto !important;

  margin: 0 !important;

  overflow: visible !important;

  white-space: normal !important;

  clip: auto !important;
}


/* =========================================================
   28. STATUS HELPERS
   ========================================================= */

.is-loading {
  pointer-events: none;
  cursor: wait !important;
}

.is-disabled {
  pointer-events: none;
  opacity: 0.6;
}

.is-hidden {
  display: none !important;
}

.is-visible {
  display: block !important;
}

.is-active {
  color: var(--color-primary);
}

.is-selected {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.is-error {
  color: var(--color-danger);
}

.is-success {
  color: var(--color-success);
}

.is-warning {
  color: var(--color-warning);
}


/* =========================================================
   29. EMPTY CONTENT
   ========================================================= */

:where(.empty-content:empty) {
  display: none;
}


/* =========================================================
   30. LOADING FOUNDATION
   ========================================================= */

.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      90deg,
      transparent,
      var(--color-surface-muted),
      transparent
    );

  background-size: 200% 100%;

  animation: base-loading-shimmer 1.5s linear infinite;
}

@keyframes base-loading-shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}


/* =========================================================
   31. TEXT TRUNCATION
   ========================================================= */

.truncate {
  overflow: hidden;

  white-space: nowrap;

  text-overflow: ellipsis;
}

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;

  overflow: hidden;

  -webkit-box-orient: vertical;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}


/* =========================================================
   32. CONTENT WRAPPER FOUNDATION
   ========================================================= */

.content-width {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
}


/* =========================================================
   33. NO SCRIPT
   ========================================================= */

noscript {
  display: block;

  padding: var(--space-4);

  background: var(--color-warning-light);
  color: var(--color-warning-text);

  border-bottom: 1px solid var(--color-warning);
  text-align: center;

  font-size: var(--font-size-sm);
}


/* =========================================================
   34. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* =========================================================
   35. MOBILE TYPOGRAPHY FOUNDATION
   ========================================================= */

@media (max-width: 767px) {
  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  h3 {
    font-size: var(--font-size-xl);
  }

  h4 {
    font-size: var(--font-size-lg);
  }
}


/* =========================================================
   36. PRINT FOUNDATION
   ========================================================= */

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  a {
    color: #000 !important;
    text-decoration: underline;
  }

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