/**
  Нормализация блочной модели
 */
*,
::before,
::after {
  box-sizing: border-box;
}

/**
  Убираем внутренние отступы слева тегам списков,
  у которых есть атрибут class
 */
:where(ul, ol):where([class]) {
  padding-left: 0;
}

/**
  Убираем внешние отступы body и двум другим тегам,
  у которых есть атрибут class
 */
body,
:where(blockquote, figure, fieldset):where([class]) {
  margin: 0;
}

/**
  Убираем внешние отступы вертикали нужным тегам,
  у которых есть атрибут class
 */
:where(h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  ul,
  ol,
  dl):where([class]) {
  margin-block: 0;
}

:where(dd[class]) {
  margin-left: 0;
}

:where(fieldset[class]) {
  padding: 0;
  border: none;
}

/**
  Убираем стандартный маркер маркированному списку,
  у которого есть атрибут class
 */
:where(ul[class]) {
  list-style: none;
}

:where(address[class]) {
  font-style: normal;
}

/**
  Обнуляем вертикальные внешние отступы параграфа,
  объявляем локальную переменную для внешнего отступа вниз,
  чтобы избежать взаимодействие с более сложным селектором
 */
p {
  --paragraphMarginBottom: 24px;

  margin-block: 0;
}

/**
  Внешний отступ вниз для параграфа без атрибута class,
  который расположен не последним среди своих соседних элементов
 */
p:where(:not([class]):not(:last-child)) {
  margin-bottom: var(--paragraphMarginBottom);
}

/**
  Наследуем свойства шрифт для полей ввода
 */
input,
textarea,
select,
button {
  font: inherit;
}

html {
  /**
    Пригодится в большинстве ситуаций
    (когда, например, нужно будет "прижать" футер к низу сайта)
   */
  height: 100%;
  /**
    Убираем скачок интерфейса по горизонтали
    при появлении / исчезновении скроллбара
   */
  scrollbar-gutter: stable;
}

/**
  Плавный скролл
 */
html {
  scroll-behavior: smooth;
}

body {
  /**
    Пригодится в большинстве ситуаций
    (когда, например, нужно будет "прижать" футер к низу сайта)
   */
  min-height: 100%;
  /**
    Унифицированный интерлиньяж
   */
  line-height: 1.5;
}

/**
  Нормализация высоты элемента ссылки при его инспектировании в DevTools
 */
a:where([class]) {
  display: inline-flex;
}

/**
  Курсор-рука при наведении на элемент
 */
button,
label {
  cursor: pointer;
}

/**
  Приводим к единому цвету svg-элементы
  (за исключением тех, у которых уже указан
  атрибут fill со значением 'none' или начинается с 'url')
 */
:where([fill]:not([fill="none"],
    [fill^="url"])) {
  fill: currentColor;
}

/**
  Приводим к единому цвету svg-элементы
  (за исключением тех, у которых уже указан
  атрибут stroke со значением 'none')
 */
:where([stroke]:not([stroke="none"],
    [stroke^="url"])) {
  stroke: currentColor;
}

/**
  Чиним баг задержки смены цвета при взаимодействии с svg-элементами
 */
svg * {
  transition-property: fill, stroke;
}

/**
  Приведение рамок таблиц в классический 'collapse' вид
 */
:where(table) {
  border-collapse: collapse;
  border-color: currentColor;
}

/**
  Удаляем все анимации и переходы для людей,
  которые предпочитают их не использовать
 */
@media (prefers-reduced-motion: reduce) {

  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Стили для скроллбара */
::-webkit-scrollbar { 
  width: 6px; 
  height: 6px; 
}
::-webkit-scrollbar-track { 
  background: #f1f1f1; 
  border-radius: 3px; 
}
::-webkit-scrollbar-thumb { 
  background: #c1c1c1; 
  border-radius: 3px; 
}
::-webkit-scrollbar-thumb:hover { 
  background: #a8a8a8; 
}

/* Глобальные настройки для Font Awesome 7 */
.fa, 
.fas, 
.far, 
.fab, 
.fal, 
.fa-solid, 
.fa-regular, 
.fa-light, 
.fa-brands {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    font-size: inherit;
    text-rendering: auto;
    line-height: 1;
    vertical-align: middle;
    font-family: "Font Awesome 7 Free", "Font Awesome 7 Brands" !important;
}


.highlighted-section {
  outline: 2px solid #3F20FB;
  background-color: rgba(63, 32, 251, 0.1);
}

.edit-button {
  position: absolute;
  z-index: 1000;
}

/* --- СПЕЦИФИКА ДЛЯ КАЛЕНДАРНОЙ КНОПКИ --- */
.month-view-btn {
  width: 160 px;
  text-align: center !important;
  white-space: nowrap !important;
}

/* Стили для неактивных кнопок календаря */
.week-prev.disabled,
.week-next.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.calendar-month.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
  transition: opacity 0.2s ease;
}

.fa-solid.fa-sign-out-alt {
    transform: scale(0.9);
    opacity: 0.85;
}

/* базовые ссылки */
.nav-link {
    position: relative;
    display: inline-block;
    padding-bottom: 0.25rem; /* pb-1 */
    color: #4B5563; /* text-gray-600 */
    font-weight: 500; /* font-medium */
    transition: color 0.3s ease;
}

/* полоска */
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px; /* толщина полоски */
    width: 0%;
    background-color: #2563eb; /* Tailwind blue-600 */
    transition: width 0.3s ease;
}

/* hover для неактивных ссылок */
.nav-link:not(.active):hover {
    color: #2563eb; /* text-blue-600 */
}

.nav-link:not(.active):hover::after {
    width: 100%;
}

/* активная ссылка */
.nav-link.active {
    color: #2563eb; /* text-blue-600 */
    font-weight: 600; /* font-semibold */
}

.nav-link.active::after {
    width: 100%; /* полоска сразу видна */
}

#toast-container {
    position: fixed;         /* фиксированное положение относительно окна */
    top: 6rem;         /* 5 в Tailwind = 1.25rem */
    left: 50%;                /* центрируем по горизонтали */
    transform: translateX(-50%);
    z-index: 9999;           /* поверх всех элементов */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;             /* отступ между toast-сообщениями */
    max-height: 90vh;        /* ограничение по высоте окна */
    overflow-y: auto;        /* прокрутка, если сообщений много */
}

.toast-message {
    background-color: #fff; /* базовый фон */
    border-left-width: 4px;
    border-left-color: #3b82f6; /* синий по умолчанию */
    color: #111827;
}

.toast-message.success {
    border-left-color: #10b981; /* зеленый */
}

.toast-message.error {
    border-left-color: #ef4444; /* красный */
}

.toast-message.info {
    border-left-color: #3b82f6; /* синий */
}

.toast-message.warning {
    border-left-color: #f59e0b; /* желтый */
}