@charset "UTF-8";

@font-face {
    font-family: 'e-Ukraine';
    src: url('../../fonts/e-Ukraine-Thin.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'e-Ukraine';
    src: url('../../fonts/e-Ukraine-Light.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'e-Ukraine';
    src: url('../../fonts/e-Ukraine-Regular.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'e-Ukraine';
    src: url('../../fonts/e-Ukraine-Medium.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'e-Ukraine';
    src: url('../../fonts/e-Ukraine-Bold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
}
:root {
    --bg-body: #F3F4F6;
    --bg-card: #FFFFFF;
    --text-main: #111827;
    --text-light: #6B7280;
    --accent: #000000;
    --border: #E5E7EB;
    --menu-width: 260px;
    --input-height: 56px;
}

/* --- БАЗОВІ СТИЛІ --- */
body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'e-Ukraine', sans-serif;
    -webkit-font-smoothing: antialiased; /* Робимо текст чіткішим */
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    display: flex;
    min-height: 100vh;
}

/* Скидання для всіх елементів */
* {
    box-sizing: border-box;
}
        
.badge-dept { 
    background: #F3F4F6; 
    color: #374151; 
    font-size: 10px; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-weight: 700; 
    text-transform: 
    uppercase; 
}

.badge-shift { 
    background: #E0E7FF; 
    color: #4338CA; 
    font-size: 10px; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-weight: 700; 
    text-transform: uppercase; 
}
   
/* 1. КОНТЕЙНЕР ВІДДІЛУ — потрібен visible щоб dropdown виходив за межі */
.department-wrapper {
    overflow: visible !important;
}

/* 2. КОНТЕЙНЕР ДЛЯ ІНПУТА */
.department-wrapper {
    position: relative !important;
    display: block;
    width: 100%;
}

/* 3. СПИСОК ПІДКАЗОК */
#department_suggestions {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    background: #fff !important;
    z-index: 9999 !important; /* Щоб бути вище інпута */
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

/* 4. ПУНКТИ СПИСКУ */
.suggestion-item {
    padding: 12px 16px !important;
    color: #111827 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    border-bottom: 1px solid #F3F4F6 !important;
    transition: background 0.2s;
    text-align: left;
}

.suggestion-item:last-child {
    border-bottom: none !important;
}

.suggestion-item:hover {
    background-color: #F9FAFB !important;
    color: #000 !important;
}

.suggestion-item strong {
    color: #2563EB !important;
    font-weight: 800 !important;
}

/* Dropdown для пошуку компаній (index.php) */
.custom-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 9999;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
}

.custom-dropdown-item {
    padding: 12px 16px !important;
    color: #111827 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    border-bottom: 1px solid #F3F4F6 !important;
    transition: background 0.2s;
    text-align: left;
}

.custom-dropdown-item:last-child {
    border-bottom: none !important;
}

.custom-dropdown-item:hover {
    background-color: #F9FAFB !important;
    color: #000 !important;
}

.custom-dropdown-item strong {
    color: #2563EB !important;
    font-weight: 800 !important;
}

/* Контейнер для сповіщень (поверх усього, справа зверху) */
#toast-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none; /* Кліки проходять крізь простір */
}

/* Сама плашка сповіщення */
.diia-toast {
    min-width: 280px;
    background-color: #ffffff;
    color: #111827;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 6px rgba(0, 0, 0, 0.05);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto; /* Щоб сповіщення можна було клікати */
    transform: translateX(120%); /* Сховано за правим краєм */
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s ease;
    border-left: 5px solid #3b82f6;
}

/* Анімація виїзду */
.diia-toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* Кольори за типами */
.diia-toast.success { border-left-color: #10B981; }
.diia-toast.error { border-left-color: #EF4444; }

/* --- САЙДБАР (МЕНЮ) --- */
.sidebar {
    width: var(--menu-width);
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 30px 20px;
    position: fixed;
    height: 100%;
    z-index: 10;
}

.action-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 8px 14px;
            font-size: 13px;
            font-weight: 500;
            border-radius: 6px;
            text-decoration: none;
            transition: all 0.2s ease;
            border: 1px solid transparent;
            cursor: pointer;
            box-sizing: border-box;
            font-family: 'e-Ukraine', sans-serif;
        }
        
        /* Червона кнопка (PDF Договір) */
        .btn-pdf {
            background-color: #FEF2F2;
            color: #DC2626;
            border-color: #FCA5A5;
        }
        .btn-pdf:hover { background-color: #FEE2E2; }
        
        /* Зелена кнопка (Завантажити скан) */
        .btn-upload {
            background-color: #ECFDF5;
            color: #059669;
            border-color: #6EE7B7;
        }
        .btn-upload:hover { background-color: #D1FAE5; }
        
        /* Синя кнопка (Дивитись скан) */
        .btn-view {
            background-color: #EFF6FF;
            color: #2563EB;
            border-color: #93C5FD;
        }
        .btn-view:hover { background-color: #DBEAFE; }

.logo {
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 40px;
    display: flex; align-items: center; gap: 10px;
}

.nav-link {
    display: block; padding: 12px 15px;
    color: var(--text-main); text-decoration: none;
    border-radius: 10px; margin-bottom: 5px;
    font-weight: 500; transition: 0.2s;
}
.nav-link:hover { background: #F9FAFB; }
.nav-link.active { background: #000; color: #fff; }

/* --- ОСНОВНА ЧАСТИНА --- */
.main-content {
    margin-left: var(--menu-width);
    padding: 40px;
    width: 100%;
}

.header-top {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 30px;
}

/* --- КАРТКИ --- */
.card {
    background: var(--bg-card);
    border-radius: 16px; padding: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.quick-actions {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 20px; margin-bottom: 30px;
}

/* --- КНОПКИ --- */
.btn {
    background: var(--accent); color: #fff;
    padding: 0 24px; height: var(--input-height);
    border-radius: 16px;
    text-decoration: none; font-weight: 500;
    border: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; font-size: 16px; width: 100%;
    transition: opacity 0.2s;
}
.btn:hover { opacity: 0.9; }

.btn-outline {
    background: transparent; border: 1px solid var(--border); color: var(--text-main);
    padding: 12px 24px; border-radius: 10px; cursor: pointer;
}
.btn-outline:hover { background: #F9FAFB; }

.btn-danger {
    background: #FEE2E2; color: #DC2626;
    padding: 8px 14px; border-radius: 10px; cursor: pointer;
    border: 1px solid #FECACA; font-size: 14px;
    transition: background 0.2s;
}
.btn-danger:hover { background: #FCA5A5; }

/* --- DIIA INPUTS (ПОЛЯ ВВОДУ) --- */
.diia-label {
    display: block; margin-bottom: 8px;
    font-size: 13px; font-weight: 600; color: #6B7280; margin-left: 4px;
}

.input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 16px;
}

.diia-field {
    width: 100%;
    height: var(--input-height);
    padding: 0 16px;
    font-family: 'e-Ukraine', sans-serif;
    font-weight: 700; 
    font-size: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    background-color: transparent; /* Прозорий, щоб було видно обгортку */
    color: #111827;
    outline: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    z-index: 2; /* Поле вище іконки */
}

.diia-field:hover { border-color: #9CA3AF; }
.diia-field:focus { border: 2px solid #000; }

/* Стиль для звичайних інпутів (без обгортки з іконкою) */
input[type="text"].diia-field, 
input[type="email"].diia-field {
    background-color: #fff;
}

/* Іконка всередині поля */
.field-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px; height: 24px;
    pointer-events: none;
    z-index: 1; /* Іконка під полем */
}

/* Хак для календаря Chrome/Safari */
input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* --- ТАБЛИЦЯ --- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--text-light); font-size: 12px; text-transform: uppercase; padding: 15px 0; border-bottom: 1px solid var(--border); }
td { padding: 20px 0; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }

.status-badge { padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.st-new { background: #DBEAFE; color: #1E40AF; }
.st-process { background: #FEF3C7; color: #92400E; }
.st-plan { background: #E0E7FF; color: #3730A3; }

/* --- МОДАЛЬНЕ ВІКНО --- */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 100;
    justify-content: center; align-items: flex-start;
    padding-top: 50px; overflow-y: auto;
}

.modal-window {
    background: #fff; width: 600px; max-width: 90%;
    padding: 30px; border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    position: relative; animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.close-btn {
    position: absolute; top: 25px; right: 25px;
    font-size: 28px; line-height: 1; cursor: pointer; color: #9CA3AF;
}
.close-btn:hover { color: #000; }

/* --- КРОК 1: СТИЛІ ДЛЯ FLATPICKR (КАЛЕНДАР) --- */
/* Робимо календар схожим на Дію */
.flatpickr-calendar {
    background: #fff !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 24px !important; /* Великі заокруглення */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    padding: 15px !important;
    font-family: 'e-Ukraine', sans-serif !important;
}

.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange, 
.flatpickr-day.selected.inRange, 
.flatpickr-day.startRange.inRange, 
.flatpickr-day.endRange.inRange, 
.flatpickr-day.selected:focus, 
.flatpickr-day.startRange:focus, 
.flatpickr-day.endRange:focus, 
.flatpickr-day.selected:hover, 
.flatpickr-day.startRange:hover, 
.flatpickr-day.endRange:hover, 
.flatpickr-day.selected.prevMonthDay, 
.flatpickr-day.startRange.prevMonthDay, 
.flatpickr-day.endRange.prevMonthDay, 
.flatpickr-day.selected.nextMonthDay, 
.flatpickr-day.startRange.nextMonthDay, 
.flatpickr-day.endRange.nextMonthDay {
    background: #000 !important; /* Чорний колір вибору як в Дії */
    border-color: #000 !important;
    color: #fff !important;
}

.flatpickr-day:hover {
    background: #F3F4F6 !important;
    border-color: #F3F4F6 !important;
}

.flatpickr-months .flatpickr-month {
    color: #000 !important;
    fill: #000 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-weight: 700 !important;
    font-family: 'e-Ukraine', sans-serif !important;
    font-size: 14px !important;
    background: #fff !important;
    border: 1.5px solid #E5E7EB !important;
    border-radius: 8px !important;
    padding: 4px 8px !important;
    color: #111827 !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Стрілки навігації — рівне вирівнювання */
.flatpickr-months {
    display: flex !important;
    align-items: center !important;
    padding: 0 4px !important;
    margin-bottom: 8px !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    position: static !important;
    padding: 0 !important;
    top: unset !important;
    line-height: 1 !important;
    transition: background .15s !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    background: #F3F4F6 !important;
    color: #111827 !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    width: 16px !important;
    height: 16px !important;
    vertical-align: middle !important;
}

.flatpickr-months .flatpickr-month {
    flex: 1 !important;
}

.flatpickr-current-month {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 0 !important;
    position: static !important;
    width: 100% !important;
    left: unset !important;
}

.flatpickr-current-month .numInputWrapper {
    width: 56px !important;
}

.flatpickr-current-month .numInputWrapper input {
    font-family: 'e-Ukraine', sans-serif !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #111827 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    text-align: center !important;
}

/* --- КРОК 2: КАСТОМНИЙ ВИПАДАЮЧИЙ СПИСОК (SELECT) --- */

/* Контейнер */
.custom-select-container {
    position: relative;
    width: 100%;
}

/* Те, що бачить користувач (Кнопка) */
.select-selected {
    background-color: #fff;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    color: #111827;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    font-size: 16px;
    font-family: 'e-Ukraine', sans-serif;
}

/* Стрілочка */
.select-selected:after {
    position: absolute;
    content: "";
    top: 24px;
    right: 20px;
    width: 10px;
    height: 10px;
    border: 2px solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: 0.3s;
}

/* Стрілочка при відкритті */
.select-selected.select-arrow-active:after {
    transform: rotate(-135deg);
    top: 28px;
}

/* Сам список опцій (випадашка) */
.select-items {
    position: absolute;
    background-color: #fff;
    top: 110%;
    left: 0;
    right: 0;
    z-index: 99;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    max-height: 250px; /* Скрол якщо багато елементів */
    overflow-y: auto;
    display: none; /* Сховано за замовчуванням */
}

/* Опція в списку */
.select-items div {
    color: #111827;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #F3F4F6;
    font-size: 15px;
}

.select-items div:last-child {
    border-bottom: none;
}

.select-items div:hover, .same-as-selected {
    background-color: #F3F4F6;
}

/* Відкритий список */
.select-show {
    display: block;
    animation: fadeIn 0.2s;
}

/* Ховаємо справжній селект */
.original-select-hide {
    display: none;
}

/* --- ВАЖЛИВЕ ВИПРАВЛЕННЯ --- */

/* Ховаємо старий системний селект */
.custom-select-container select {
    display: none; 
}

/* Робимо так, щоб наш гарний список був поверх всього */
.select-items {
    z-index: 9999 !important; /* Дуже високий пріоритет, щоб перекривав все */
}

/* Кнопка "Плюс" біля селекта */
.input-group-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-icon-add {
    width: 56px; /* Висота як у інпутів */
    height: 56px;
    background: #000;
    color: #fff;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: 0.2s;
    margin-bottom: 20px; /* Вирівнювання */
}

.btn-icon-add:hover {
    background: #333;
    transform: scale(1.05);
}

/* --- СТИЛІ ДЛЯ ПОШУКУ СПІКЕРА --- */
.speaker-search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 500;
    max-height: 200px;
    overflow-y: auto;
    display: none; /* Сховано */
}

.search-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #F3F4F6;
}
.search-item:hover { background: #F9FAFB; }
.search-item img {
    width: 32px; height: 32px; border-radius: 50%; margin-right: 10px; object-fit: cover;
}
.search-item .name { font-weight: 600; font-size: 14px; }
.search-item .dept { font-size: 11px; color: #6B7280; }

/* Картка обраного спікера */
.current-speaker-card {
    display: flex; align-items: center;
    background: #F0FDF4; border: 1px solid #BBF7D0;
    padding: 15px; border-radius: 12px;
    margin-top: 10px;
}

/* --- СТИЛІ ДЛЯ СТОРІНКИ ПЕРСОНАЛУ --- */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.staff-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s;
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.staff-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: #F3F4F6;
}

.staff-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.staff-info p {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: var(--text-light);
}

/* Модальне вікно для компанії (трохи менше і вище за рівнем) */
#companyModal {
    z-index: 200; /* Щоб перекривало вікно запиту */
    background: rgba(0,0,0,0.7); /* Трохи темніший фон */
}

#mediaResultBlock { display: none; border-color: #10B981; background: #ECFDF5; padding: 20px; border-radius: 16px; margin-bottom: 20px; border: 1px solid #10B981; }
/* ===================================================
   МЕДІА-ХАБ: КАСТОМНІ СЕЛЕКТИ (стиль проєкту)
   =================================================== */

/* Базовий контейнер */
.mh-select {
    position: relative;
    width: 100%;
    user-select: none;
}

/* Тригер-кнопка */
.mh-select__trigger {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid #E5E7EB;
    background: #F9FAFB;
    font-family: 'e-Ukraine', sans-serif;
    font-size: 15px;
    color: #111827;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
    text-align: left;
}
.mh-select__trigger:hover,
.mh-select.open .mh-select__trigger {
    border-color: #0561FF;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(5,97,255,0.10);
    outline: none;
}

/* Стрілка */
.mh-select__arrow {
    width: 16px; height: 16px;
    flex-shrink: 0;
    color: #6B7280;
    transition: transform 0.2s;
}
.mh-select.open .mh-select__arrow { transform: rotate(180deg); }
.mh-select__label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Дропдаун — через portal (fixed) */
.mh-select__dropdown {
    position: fixed;
    background: #fff;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    z-index: 99999;
    box-shadow: 0 8px 24px -4px rgba(0,0,0,0.14);
    max-height: 260px;
    overflow-y: auto;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: #E5E7EB transparent;
    min-width: 200px;
}
.mh-select__dropdown.open { display: block; }

/* Опції */
.mh-select__option {
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: #111827;
    transition: background 0.12s;
}
.mh-select__option:first-child { border-radius: 10px 10px 0 0; }
.mh-select__option:last-child  { border-radius: 0 0 10px 10px; }
.mh-select__option:hover { background: #F0F6FF; color: #0561FF; }
.mh-select__option.selected { background: #0561FF; color: #fff; font-weight: 700; }
.mh-select__option.selected:hover { background: #0561FF; }

/* Підсвітка пошуку */
.mh-select__option strong { color: #0561FF; font-weight: 800; }
.mh-select__option.selected strong { color: #fff; }

/* ===================================================
   МЕДІА-ХАБ: ПОШУК ПЕРСОНАЛУ (ПОВЕРХ МОДАЛКИ)
   =================================================== */
.staff-search-wrap {
    position: relative;
    z-index: 10;
}

.staff-search-portal {
    position: fixed;
    background: #fff;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    z-index: 999999;
    box-shadow: 0 8px 32px -4px rgba(0,0,0,0.18);
    max-height: 320px;
    overflow-y: auto;
    display: none;
    scrollbar-width: thin;
    min-width: 280px;
}
.staff-search-portal.open { display: block; }

/* Картка персоналу у випадашці */
.staff-search-item {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid #F3F4F6;
    transition: background 0.12s;
}
.staff-search-item:last-child { border-bottom: none; }
.staff-search-item:hover { background: #F0F6FF; }
.staff-search-item:first-child { border-radius: 10px 10px 0 0; }
.staff-search-item:last-child  { border-radius: 0 0 10px 10px; }

.staff-search-item__photo {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #E5E7EB;
}
.staff-search-item__info { flex: 1; min-width: 0; }
.staff-search-item__name { font-weight: 700; font-size: 14px; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.staff-search-item__dept { font-size: 11px; color: #6B7280; }

/* Картка доданого спікера — оновлена */
.speaker-card {
    background: #F9FAFB;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    transition: border-color 0.15s;
}
.speaker-card:hover { border-color: #D1D5DB; }
.speaker-card__photo {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #E5E7EB;
}
.speaker-card__info { flex: 1; min-width: 0; }
.speaker-card__name { font-weight: 700; font-size: 14px; color: #111827; margin-bottom: 2px; }
.speaker-card__phone { font-size: 12px; color: #6B7280; display: flex; align-items: center; gap: 4px; }
.speaker-card__remove {
    background: none; border: none;
    cursor: pointer;
    color: #9CA3AF;
    font-size: 20px;
    line-height: 1;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.speaker-card__remove:hover { color: #EF4444; background: #FEF2F2; }


/* ===================================================
   МУЛЬТИСЕЛЕКТ msw-wrap — inline dropdown з чекбоксами
   =================================================== */
.msw-wrap {
    position: relative;
    width: 100%;
    font-family: 'e-Ukraine', sans-serif;
}

/* Шапка — поле з тегами */
.msw-header {
    min-height: 48px;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1.5px solid #E5E7EB;
    background: #F9FAFB;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    transition: border-color 0.15s, box-shadow 0.15s;
    user-select: none;
    position: relative;
}
.msw-header:hover,
.msw-wrap.msw-open .msw-header {
    border-color: #0561FF;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(5,97,255,0.10);
}

/* Плейсхолдер */
.msw-placeholder {
    font-size: 15px;
    color: #9CA3AF;
    line-height: 1.4;
}

/* Стрілка */
.msw-arrow {
    width: 16px;
    height: 16px;
    color: #6B7280;
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.2s;
    pointer-events: none;
}

/* Тег обраного */
.msw-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1D4ED8;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.msw-tag-x {
    background: none;
    border: none;
    cursor: pointer;
    color: #93C5FD;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.15s;
}
.msw-tag-x:hover { color: #1D4ED8; }

/* Список опцій (inline, не portal) */
.msw-list {
    display: none;
    margin-top: 4px;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 16px -4px rgba(0,0,0,0.12);
}
.msw-wrap.msw-open .msw-list {
    display: block;
}

/* Рядок опції */
.msw-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid #F3F4F6;
}
.msw-item:last-child { border-bottom: none; }
.msw-item:hover { background: #F0F6FF; }
.msw-item.checked { background: #EFF6FF; }
.msw-item.checked:hover { background: #DBEAFE; }

/* Чекбокс */
.msw-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid #D1D5DB;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}
.msw-item.checked .msw-checkbox {
    background: #0561FF;
    border-color: #0561FF;
}
.msw-checkbox svg {
    width: 10px;
    height: 10px;
}

/* Назва опції */
.msw-label {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}
.msw-item.checked .msw-label {
    color: #1D4ED8;
    font-weight: 600;
}

/* ===================================================
   LIGHTBOX: КАСТОМНІ КОНТРОЛИ ВІДЕО
   =================================================== */
.lb-video-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lb_video {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    display: block;
}

/* Панель контролів */
.lb-video-controls {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    padding: 12px 16px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
    border-radius: 0 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.lb-video-wrap:hover .lb-video-controls,
.lb-video-controls.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Прогрес-бар */
.lb-progress-wrap {
    position: relative;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.2);
    border-radius: 99px;
    cursor: pointer;
    transition: height 0.15s;
}
.lb-progress-wrap:hover { height: 5px; }

.lb-progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 99px;
    width: 0%;
    pointer-events: none;
    position: relative;
}
.lb-progress-fill::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 10px; height: 10px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s;
}
.lb-progress-wrap:hover .lb-progress-fill::after { transform: translateY(-50%) scale(1); }

/* Нижній рядок */
.lb-controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Кнопки */
.lb-ctrl-btn {
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 8px;
    color: #fff;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
    padding: 0;
}
.lb-ctrl-btn:hover {
    background: rgba(255,255,255,0.22);
    transform: scale(1.08);
}
.lb-ctrl-btn svg { width: 16px; height: 16px; fill: #fff; }

/* Час */
.lb-time {
    font-family: 'e-Ukraine', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.3px;
    white-space: nowrap;
    margin-right: auto;
}

/* Гучність */
.lb-volume-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lb-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 70px;
    height: 3px;
    border-radius: 99px;
    background: rgba(255,255,255,0.25);
    outline: none;
    cursor: pointer;
    transition: width 0.2s;
}
.lb-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}
.lb-volume-slider::-moz-range-thumb {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
}

/* ── Нативний select у дизайн-системі (diia-field) ── */
select.diia-field {
    appearance: none;
    -webkit-appearance: none;
    font-family: 'e-Ukraine', sans-serif;
    background-color: #F9FAFB;
    cursor: pointer;
}

select.diia-field:focus {
    outline: none;
    border-color: #111827;
    background: #fff;
}

/* Обгортка з кастомною стрілкою */
.select-wrap {
    position: relative;
    width: 100%;
}

.select-wrap select.diia-field {
    padding-right: 36px;
}

.select-wrap .select-arrow {
    pointer-events: none;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #6B7280;
}