/* Вспомогательные классы */

/* Видимость */
.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.invisible {
  visibility: hidden;
}

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

/* Позиционирование */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.sticky {
  position: sticky;
}

.top-0 {
  top: 0;
}

.bottom-0 {
  bottom: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

/* Отступы */
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mr-0 { margin-right: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.ml-0 { margin-left: 0 !important; }
.mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }

.m-auto { margin: auto !important; }
.mt-auto { margin-top: auto !important; }
.mr-auto { margin-right: auto !important; }
.mb-auto { margin-bottom: auto !important; }
.ml-auto { margin-left: auto !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.my-auto { margin-top: auto !important; margin-bottom: auto !important; }

/* Паддинги */
.p-0 { padding: 0 !important; }
.pt-0 { padding-top: 0 !important; }
.pr-0 { padding-right: 0 !important; }
.pb-0 { padding-bottom: 0 !important; }
.pl-0 { padding-left: 0 !important; }
.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }

/* Цвета */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-accent { color: var(--accent-color) !important; }
.text-light { color: var(--light-gray) !important; }
.text-dark { color: var(--dark-gray) !important; }
.text-white { color: #fff !important; }
.text-black { color: #000 !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-accent { background-color: var(--accent-color) !important; }
.bg-light { background-color: var(--light-gray) !important; }
.bg-dark { background-color: var(--dark-gray) !important; }
.bg-white { background-color: #fff !important; }
.bg-black { background-color: #000 !important; }

/* Выравнивание */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-justify { text-align: justify !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; }

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

.self-start { align-self: flex-start !important; }
.self-center { align-self: center !important; }
.self-end { align-self: flex-end !important; }

/* Отображение */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* Флексбокс */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-1 { flex: 1 !important; }
.flex-grow { flex-grow: 1 !important; }
.flex-shrink { flex-shrink: 1 !important; }

/* Ширина */
.w-full { width: 100% !important; }
.w-half { width: 50% !important; }
.w-third { width: 33.333% !important; }
.w-quarter { width: 25% !important; }
.w-auto { width: auto !important; }

/* Высота */
.h-full { height: 100% !important; }
.h-screen { height: 100vh !important; }
.h-auto { height: auto !important; }

/* Типографика */
.font-light { font-weight: 300 !important; }
.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }

.text-xs { font-size: var(--font-size-xs) !important; }
.text-sm { font-size: var(--font-size-sm) !important; }
.text-base { font-size: var(--font-size-base) !important; }
.text-md { font-size: var(--font-size-md) !important; }
.text-lg { font-size: var(--font-size-lg) !important; }
.text-xl { font-size: var(--font-size-xl) !important; }
.text-xxl { font-size: var(--font-size-xxl) !important; }
.text-h1 { font-size: var(--font-size-h1) !important; }
.text-h2 { font-size: var(--font-size-h2) !important; }
.text-h3 { font-size: var(--font-size-h3) !important; }
.text-h4 { font-size: var(--font-size-h4) !important; }

.leading-tight { line-height: 1.25 !important; }
.leading-snug { line-height: 1.375 !important; }
.leading-normal { line-height: var(--font-line-height) !important; }
.leading-relaxed { line-height: 1.625 !important; }

.tracking-tight { letter-spacing: -0.05em !important; }
.tracking-normal { letter-spacing: 0 !important; }
.tracking-wide { letter-spacing: 0.025em !important; }

/* Радиус */
.rounded-none { border-radius: 0 !important; }
.rounded-sm { border-radius: var(--border-radius-sm) !important; }
.rounded { border-radius: var(--border-radius-md) !important; }
.rounded-lg { border-radius: var(--border-radius-lg) !important; }
.rounded-full { border-radius: 9999px !important; }

.rounded-t-none { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
.rounded-t-sm { border-top-left-radius: var(--border-radius-sm) !important; border-top-right-radius: var(--border-radius-sm) !important; }
.rounded-t { border-top-left-radius: var(--border-radius-md) !important; border-top-right-radius: var(--border-radius-md) !important; }
.rounded-t-lg { border-top-left-radius: var(--border-radius-lg) !important; border-top-right-radius: var(--border-radius-lg) !important; }

.rounded-b-none { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.rounded-b-sm { border-bottom-left-radius: var(--border-radius-sm) !important; border-bottom-right-radius: var(--border-radius-sm) !important; }
.rounded-b { border-bottom-left-radius: var(--border-radius-md) !important; border-bottom-right-radius: var(--border-radius-md) !important; }
.rounded-b-lg { border-bottom-left-radius: var(--border-radius-lg) !important; border-bottom-right-radius: var(--border-radius-lg) !important; }

.rounded-l-none { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.rounded-l-sm { border-top-left-radius: var(--border-radius-sm) !important; border-bottom-left-radius: var(--border-radius-sm) !important; }
.rounded-l { border-top-left-radius: var(--border-radius-md) !important; border-bottom-left-radius: var(--border-radius-md) !important; }
.rounded-l-lg { border-top-left-radius: var(--border-radius-lg) !important; border-bottom-left-radius: var(--border-radius-lg) !important; }

.rounded-r-none { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.rounded-r-sm { border-top-right-radius: var(--border-radius-sm) !important; border-bottom-right-radius: var(--border-radius-sm) !important; }
.rounded-r { border-top-right-radius: var(--border-radius-md) !important; border-bottom-right-radius: var(--border-radius-md) !important; }
.rounded-r-lg { border-top-right-radius: var(--border-radius-lg) !important; border-bottom-right-radius: var(--border-radius-lg) !important; }

/* Тени */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--shadow-light) !important; }
.shadow { box-shadow: var(--shadow-medium) !important; }
.shadow-lg { box-shadow: var(--shadow-heavy) !important; }

/* Анимации */
.animate-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.animate-fade-out {
  animation: fadeOut 0.3s ease-in-out;
}

.animate-slide-in-up {
  animation: slideInUp 0.3s ease-out;
}

.animate-slide-out-down {
  animation: slideOutDown 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* Псевдоэлементы */
.before\:content-attr::before {
  content: attr(data-content);
}

.after\:content-attr::after {
  content: attr(data-content);
}

/* Состояния */
.hover\:opacity-75:hover {
  opacity: 0.75;
}

.hover\:opacity-50:hover {
  opacity: 0.5;
}

.focus\:outline-none:focus {
  outline: none;
}

.focus\:ring-2:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Адаптивные классы */
@media (min-width: 768px) {
  .md\:hidden { display: none !important; }
  .md\:block { display: block !important; }
  .md\:flex { display: flex !important; }
  .md\:grid { display: grid !important; }

  .md\:w-half { width: 50% !important; }
  .md\:w-third { width: 33.333% !important; }
  .md\:w-quarter { width: 25% !important; }

  .md\:text-left { text-align: left !important; }
  .md\:text-center { text-align: center !important; }
  .md\:text-right { text-align: right !important; }

  .md\:flex-row { flex-direction: row !important; }
  .md\:flex-col { flex-direction: column !important; }
  .md\:flex-wrap { flex-wrap: wrap !important; }
  .md\:flex-nowrap { flex-wrap: nowrap !important; }
}

@media (min-width: 1024px) {
  .lg\:hidden { display: none !important; }
  .lg\:block { display: block !important; }
  .lg\:flex { display: flex !important; }
  .lg\:grid { display: grid !important; }

  .lg\:w-half { width: 50% !important; }
  .lg\:w-third { width: 33.333% !important; }
  .lg\:w-quarter { width: 25% !important; }

  .lg\:text-left { text-align: left !important; }
  .lg\:text-center { text-align: center !important; }
  .lg\:text-right { text-align: right !important; }

  .lg\:flex-row { flex-direction: row !important; }
  .lg\:flex-col { flex-direction: column !important; }
  .lg\:flex-wrap { flex-wrap: wrap !important; }
  .lg\:flex-nowrap { flex-wrap: nowrap !important; }
}

/* Печать */
@media print {
  .print\:hidden { display: none !important; }
  .print\:block { display: block !important; }
  .print\:no-border { border: none !important; }
  .print\:no-bg { background: none !important; }
  .print\:text-black { color: #000 !important; }
}
