/**
  Нормализация блочной модели
 */
*,
::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: #0F3B66; /* brand.accent */
    transition: width 0.3s ease;
}

/* hover для неактивных ссылок */
.nav-link:not(.active):hover {
    color: #0F3B66; /* brand.accent */
}

.nav-link:not(.active):hover::after {
    width: 100%;
}

/* активная ссылка */
.nav-link.active {
    color: #0F3B66; /* brand.accent */
    font-weight: 600; /* font-semibold */
}

.nav-link.active::after {
    width: 100%; /* полоска сразу видна */
}

/* Мобильные ссылки в сайдбаре */
.nav-link-mobile {
    display: flex;
    align-items: center;
    color: #4B5563;
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link-mobile:hover {
    color: #0F3B66;
    background-color: #F7F6F3;
}

.nav-link-mobile.active {
    color: #0F3B66;
    font-weight: 600;
    background-color: #EEF3F8;
}

/* Бургер-меню: видно на ширине < 800px */
#mobile-menu-button {
    display: flex;
}

/* Десктопная навигация: видно на ширине >= 800px */
#desktop-nav {
    display: none;
}

@media (min-width: 800px) {
    #mobile-menu-button {
        display: none;
    }

    #desktop-nav {
        display: flex;
    }
}

#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; /* желтый */
}

/* ============================================
   Avatar Placeholder Styles
   Плейсхолдеры для аватарок и логотипов
   ============================================ */

/* Базовый класс для плейсхолдера аватарки */
.avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
    text-transform: uppercase;
}

/* Квадратная версия для плейсхолдеров (Settings, Profile и т.д.) */
.avatar-placeholder.rounded-xl {
    border-radius: 12px;
}

/* Размеры аватарок */
.avatar-xs {
    width: 24px;
    height: 24px;
    font-size: 10px;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.avatar-md {
    width: 40px;
    height: 40px;
    font-size: 14px;
}

/* Tailwind-совместимые классы для переопределения размеров */
.avatar-md.w-14,
.avatar-md.w-14.h-14 {
    width: 56px !important;
    height: 56px !important;
}

.avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 16px;
}

/* Tailwind-совместимые классы для переопределения размеров */
.avatar-lg.w-14,
.avatar-lg.w-14.h-14 {
    width: 56px !important;
    height: 56px !important;
}

.avatar-xl {
    width: 64px;
    height: 64px;
    font-size: 20px;
}

.avatar-xl.w-20,
.avatar-xl.w-20.h-20 {
    width: 80px !important;
    height: 80px !important;
}

.avatar-1xl {
    width: 56px;
    height: 56px;
    font-size: 18px;
}

.avatar-2xl {
    width: 96px;
    height: 96px;
    font-size: 28px;
}

/* Плейсхолдер для логотипа бизнеса */
.business-logo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
    text-transform: uppercase;
}

.business-logo-placeholder i {
    font-size: 0.6em;
}

/* Увеличенная иконка для My Bookings */
.business-logo-md i,
.business-logo-placeholder i {
    font-size: 1.2em;
}

.business-logo-xs {
    width: 32px;
    height: 32px;
    font-size: 10px;
}

.business-logo-sm {
    width: 40px;
    height: 40px;
    font-size: 12px;
}

.business-logo-md {
    width: 48px;
    height: 48px;
    font-size: 14px;
}

.business-logo-lg {
    width: 64px;
    height: 64px;
    font-size: 18px;
}

.business-logo-xl {
    width: 80px;
    height: 80px;
    font-size: 20px;
}

.business-logo-2xl {
    width: 128px;
    height: 128px;
    font-size: 32px;
}