/* Стили для полноэкранной карты с правым меню */

.nmap-full-page {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.nmap-header-section {
    background-color: #333;
    padding: 15px 20px;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.nmap-header-section h1 {
    margin: 0;
    font-size: 24px;
    color: #ffd700;
}

.nmap-controls {
    display: flex;
    gap: 10px;
}

.nmap-btn {
    background-color: #444;
    color: white;
    border: 1px solid #666;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.nmap-btn:hover {
    background-color: #555;
    border-color: #777;
}

.nmap-main-content {
    flex: 1 1 auto;
    position: relative;
    background-color: #111;
    overflow: hidden;
    min-height: 400px; /* Минимальная высота */
    max-height: 70vh; /* Максимальная высота 70% от высоты окна */
}

.nmap-canvas-full {
    width: 100%;
    height: 100%;
    background-color: #000;
    position: relative;
}

/* Информационная панель */
.nmap-info-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 300px;
    background-color: rgba(40, 40, 40, 0.95);
    border: 1px solid #555;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    max-height: 80%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.nmap-info-header {
    background-color: #333;
    padding: 12px 15px;
    border-bottom: 1px solid #555;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.nmap-info-header span {
    font-weight: bold;
    color: #ffd700;
}

.nmap-close-btn {
    background: none;
    border: none;
    color: #ff6666;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nmap-info-content {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

.nmap-info-content h3 {
    margin: 0 0 10px 0;
    color: #4CAF50;
    font-size: 16px;
}

.nmap-info-content ul {
    margin: 0;
    padding-left: 20px;
}

.nmap-info-content li {
    margin-bottom: 5px;
    color: #ccc;
}

/* Адаптивность */
@media (max-width: 768px) {
    .nmap-header-section {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .nmap-header-section h1 {
        font-size: 20px;
    }
    
    .nmap-controls {
        width: 100%;
        justify-content: center;
    }
    
    .nmap-info-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 400px;
        max-height: 80vh;
    }
}

/* Скроллбары */
.nmap-info-content::-webkit-scrollbar {
    width: 8px;
}

.nmap-info-content::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.nmap-info-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.nmap-info-content::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Стили для легенды под картой */
.nmap-legend-section {
    background-color: #2a2a2a;
    border-top: 1px solid #444;
    padding: 20px;
    flex-shrink: 0;
    max-height: 250px; /* Уменьшена максимальная высота */
    overflow-y: auto;
}

.nmap-legend-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.nmap-legend-header h3 {
    margin: 0;
    color: #ffd700;
    font-size: 18px;
}

.nmap-legend-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.nmap-legend-list {
    width: 100%;
}

.nmap-legend-group {
    margin-bottom: 15px;
    background-color: #333;
    border-radius: 6px;
    padding: 12px;
}

.nmap-legend-group-title {
    margin: 0 0 10px 0;
    color: #4CAF50;
    font-size: 15px;
    font-weight: bold;
}

.nmap-legend-items {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.nmap-legend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    margin-bottom: 4px;
    background-color: #3a3a3a;
    border-radius: 4px;
    font-size: 13px;
}

.nmap-legend-item:hover {
    background-color: #444;
}

.nmap-legend-name {
    color: #fff;
    flex: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nmap-legend-coords {
    color: #aaa;
    font-family: monospace;
    font-size: 12px;
    min-width: 80px;
    text-align: right;
}

.nmap-legend-owner {
    color: #ffd700;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    background-color: rgba(255, 215, 0, 0.1);
    border-radius: 3px;
    margin-left: 8px;
}

/* Адаптивность для легенды */
@media (max-width: 768px) {
    .nmap-main-content {
        min-height: 300px; /* Минимальная высота на мобильных */
        max-height: 60vh; /* Меньше максимальная высота на мобильных */
    }
    
    .nmap-legend-section {
        padding: 15px 10px;
        max-height: 200px; /* Меньше на мобильных */
    }
    
    .nmap-legend-content {
        gap: 10px;
    }
    
    .nmap-legend-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .nmap-legend-coords,
    .nmap-legend-owner {
        align-self: flex-end;
    }
}

/* Скроллбар для легенды */
.nmap-legend-section::-webkit-scrollbar {
    width: 8px;
}

.nmap-legend-section::-webkit-scrollbar-track {
    background: #222;
}

.nmap-legend-section::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.nmap-legend-section::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Стили для формы поиска */
.nmap-search-section {
    background-color: #2a1a0a;
    padding: 20px;
    border-bottom: 1px solid #444;
    flex-shrink: 0;
}

.nmap-search-info {
    color: #ccc;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #3a2a0a;
    border-radius: 8px;
    border-left: 4px solid #FF6600;
}

.nmap-search-form {
    padding: 0;
    margin: 0;
}

.nmap-search-input-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nmap-search-input-group label {
    color: #FFFFFF;
    font-weight: bold;
    white-space: nowrap;
}

.nmap-search-input-group input[type="text"] {
    border: 2px solid #5B380F;
    width: 250px;
    height: 35px;
    background-color: #E7E0C2;
    color: #5B380F;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 14px;
}

.nmap-search-input-group input[type="text"]:focus {
    outline: none;
    border-color: #FF6600;
    box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

.nmap-search-button {
    background-color: #FF6600;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.3s;
}

.nmap-search-button:hover {
    background-color: #FF8500;
    transform: translateY(-1px);
}

.nmap-search-result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    background-color: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

/* Адаптивность для формы поиска */
@media (max-width: 768px) {
    .nmap-search-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .nmap-search-input-group input[type="text"] {
        width: 100%;
    }
    
    .nmap-search-section {
        padding: 15px;
    }
}