/*
 * BASE.CSS - Базовые стили
 * Содержит: сброс стилей, типографику, переменные, базовые элементы
 */

/* ===== ИМПОРТЫ ===== */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

/* Material Icons fix */
.material-icons-outlined {
  font-family: 'Material Icons Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* ===== CSS ПЕРЕМЕННЫЕ ===== */
:root {
  /* Цвета */
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;

  /* Фон */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-section: #f8f9fa;

  /* Границы */
  --border-color: #dee2e6;
  --border-radius: 0.375rem;
  --border-radius-lg: 1rem;

  /* Тени */
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);

  /* Типография */
  --font-family: "Noto Sans", sans-serif;
  --font-size-base: 14px;
  --line-height-base: 1.5;
  --letter-spacing: 0.5px;

  /* Размеры */
  --header-height: 70px;
  --sidebar-width: 250px;

  /* Переходы */
  --transition-base: all 0.3s ease;
  --transition-fast: all 0.15s ease;
}

/* ===== БАЗОВЫЕ ЭЛЕМЕНТЫ ===== */
* {
  box-sizing: border-box;
}

body {
  position: relative;
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  letter-spacing: var(--letter-spacing);
  background-color: var(--bg-primary);
  cursor: default;
  line-height: var(--line-height-base);
  margin: 0;
  padding: 0;
}

/* Ссылки */
a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition-fast);
}

a.disabled {
  color: #bbb !important;
  pointer-events: none;
}

/* Формы */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

input::-moz-placeholder {
  color: #000 !important;
  opacity: 0.3 !important;
}

input::placeholder {
  color: #000 !important;
  opacity: 0.3 !important;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}

/* Параграфы */
p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Списки */
ul, ol {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-left: 2rem;
}

/* Изображения */
img {
  max-width: 100%;
  height: auto;
}

/* Таблицы */
table {
  border-collapse: collapse;
  width: 100%;
}

/* Кнопки */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

/* Скроллбар */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

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

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translate3d(0, -6px, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translate3d(0, 6px, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

/* ===== БАЗОВЫЕ КЛАССЫ ===== */
.bg-section {
  background-color: var(--bg-section) !important;
}

.transition-base {
  transition: var(--transition-base);
}

.transition-fast {
  transition: var(--transition-fast);
}

.shadow-custom {
  box-shadow: var(--shadow);
}

.border-radius-custom {
  border-radius: var(--border-radius);
}

.border-radius-lg-custom {
  border-radius: var(--border-radius-lg);
}

/* ===== ACCESSIBILITY ===== */
.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;
}

/* Focus styles */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a, a:visited {
    text-decoration: underline;
  }

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