/* ПОДКЛЮЧАЕМ ШРИФТЫ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;600;700&display=swap');

/* БАЗОВЫЕ СТИЛИ */
body {
    font-family: 'Noto Sans', sans-serif;
}

/* ДЛЯ SVG ОСТАВЛЯЕМ ROBOTO CONDENSED */
#expo-svg text,
#expo-svg tspan {
    font-family: 'Roboto Condensed', sans-serif;
}

/* ============================= */
/* КОМПАКТНЫЙ ФИЛЬТР УЧАСТНИКОВ   */
/* ============================= */

.participants-bar {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin: 0 0 25px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eef2f6;
}

.participants-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.participants-header h2 {
    font-size: 1.2rem;
    color: #115a69;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 600;
}

.participants-header h2 span {
    background: #115a69;
    color: white;
    padding: 2px 10px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
}

.compact-participants-selector {
    position: relative;
    width: 100%;
}

.compact-participants-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.compact-participants-trigger {
    flex: 1;
    height: 44px;
    padding: 0 15px;
    background: white;
    border: 1px solid #D9E2E6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
    color: #003A40;
    font-size: 14px;
    font-family: 'Noto Sans', sans-serif;
}

.compact-participants-trigger:hover {
    border-color: #03ADB4;
}

.compact-participants-trigger .arrow {
    transition: transform 0.3s;
    color: #03ADB4;
}

.compact-participants-trigger.active .arrow {
    transform: rotate(180deg);
}

.compact-participants-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #D9E2E6;
    border-radius: 8px;
    margin-top: 5px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.compact-participants-dropdown.show {
    display: block;
}

.compact-search {
    margin-bottom: 15px;
}

.compact-search input {
    width: 95%;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #D9E2E6;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: 'Noto Sans', sans-serif;
}

.compact-search input:focus {
    outline: none;
    border-color: #03ADB4;
}

.compact-search input::placeholder {
    color: #999;
}

.compact-participants-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #eef2f6;
    border-radius: 8px;
}

.compact-participant-divider {
    background: #03ADB4;
    color: white;
    padding: 6px 12px;
    margin: 12px 0 6px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0px;
    text-align: center;
    width: calc(100% - 4px);
    box-sizing: border-box;
}

.compact-participant-item {
    padding: 10px 12px;
    border-bottom: 1px solid #eef2f6;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compact-participant-item:last-child {
    border-bottom: none;
}

.compact-participant-item:hover {
    background: #f0f9fa;
}

.compact-participant-item.selected {
    background: #e0f0f2;
    border-left: 3px solid #03ADB4;
}

.compact-participant-name {
    font-size: 13px;
    color: #115a69;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    font-family: 'Noto Sans', sans-serif;
}

.compact-participant-stand {
    font-size: 11px;
    color: #6c7a8e;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #D9E2E6;
    font-weight: 500;
    font-family: 'Noto Sans', sans-serif;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 5px 12px;
    border-radius: 30px;
    border: 1px solid #D9E2E6;
}

.sort-control label {
    color: #6c7a8e;
    font-size: 13px;
    font-family: 'Noto Sans', sans-serif;
}

.sort-select {
    padding: 5px 10px;
    border: none;
    font-size: 13px;
    color: #115a69;
    background: transparent;
    cursor: pointer;
    outline: none;
    font-weight: 500;
    font-family: 'Noto Sans', sans-serif;
}

.selected-participant-indicator {
    background: #03ADB4;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Noto Sans', sans-serif;
}

.selected-participant-indicator button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    padding: 0 5px;
    opacity: 0.8;
    font-family: 'Noto Sans', sans-serif;
}

.selected-participant-indicator button:hover {
    opacity: 1;
}

/* ============================= */
/* СТИЛИ ДЛЯ КАРТЫ               */
/* ============================= */

.expo-map-container {
    margin: 0 0 30px 0;
    border: 1px solid #e0e6ed;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
}

.expo-map-full {
    background: #ffffff;
    padding: 20px;
    min-height: 600px;
}

#expo-svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================= */
/* СТИЛИ ДЛЯ СТЕНДОВ             */
/* ============================= */

.stand-group {
    cursor: pointer !important;
    transition: all 0.2s ease;
}

.stand-group:hover path {
    fill: rgba(3, 173, 180, 0.3) !important;
    fill-opacity: 1 !important;
}

.stand-group.highlighted path {
    fill: rgba(3, 173, 180, 0.2) !important;
    fill-opacity: 1 !important;
}

.stand-group.super-highlight path {
    fill: rgba(3, 173, 180, 0.2) !important;
    fill-opacity: 1 !important;
}

.stand-group.dimmed {
    opacity: 0.3;
}

/* ============================= */
/* СТИЛИ МОДАЛЬНОГО ОКНА         */
/* ============================= */

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 30px;
    width: 500px;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 20px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
    overflow-y: auto;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: 300;
    color: #6c7a8e;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 50%;
}

.close:hover {
    color: #115a69;
    background: #e0e0e0;
}

#modal-content-inner {
    font-family: 'Noto Sans', sans-serif;
}

/* ============================= */
/* ЗАГОЛОВОК СТЕНДА В МОДАЛКЕ    */
/* ============================= */

.modal-stand-header {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 2px solid #1D8375;
}

.modal-stand-label {
    color: #6c7a8e;
    font-size: 14px;
    font-weight: 500;
}

.modal-stand-value {
    color: #1D8375;
    font-size: 22px;
    font-weight: 700;
    font-family: 'Roboto Condensed', sans-serif;
}

/* ============================= */
/* СПИСОК КОМПАНИЙ В МОДАЛКЕ     */
/* ============================= */

.modal-companies-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modal-company-block {
    padding: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fafafa;
}

/* Если компания одна — без рамки, как было раньше */
.modal-company-block:only-child {
    border: none;
    background: transparent;
    padding: 0;
}

/* ============================= */
/* КОНТЕНТ ВНУТРИ БЛОКА КОМПАНИИ */
/* ============================= */

.modal-company-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-logo-wrapper {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-logo-wrapper img {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.modal-company-title {
    color: #115a69;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    flex: 1;
}

.modal-info-row {
    margin: 15px 0;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f6;
    display: flex;
}

.modal-info-label {
    font-weight: 600;
    min-width: 100px;
    color: #6c7a8e;
}

.modal-info-value {
    color: #003A40;
    font-weight: 500;
}

.modal-contacts {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

main.plan .modal-contacts h3 {
    color: #115a69 !important;
    font-size: 1.2rem !important;
    margin: 0 0 10px 0 !important;
}

main.plan .modal-contacts p {
    margin: 5px 0 !important;
    color: #666666 !important;
    font-size: 0.9rem !important;
}

main.plan .modal-contacts p strong {
    color: #115a69 !important;
}

main.plan .modal-contacts a {
    color: #03ADB4;
    text-decoration: none;
}

main.plan .modal-contacts a:hover {
    text-decoration: underline;
}

/* ============================= */
/* ПРОЧЕЕ                        */
/* ============================= */

.no-results {
    padding: 30px;
    text-align: center;
    color: #6c7a8e;
    font-style: italic;
    grid-column: 1 / -1;
    font-family: 'Noto Sans', sans-serif;
}

/* ============================= */
/* АДАПТИВ                       */
/* ============================= */

@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .modal-info-row {
        flex-direction: column;
    }

    .modal-info-label {
        margin-bottom: 5px;
    }
}