* { box-sizing: border-box; }
body { margin:0; font-family:"Inter",Arial,sans-serif; overflow:hidden; }
#map-wrapper { position:absolute; top:0; left:0; right:277px; bottom:0; background:#111; cursor:grab; }
#map-svg { width:100%; height:100%; }
polygon { fill: rgba(0,150,255,0.35); stroke: rgba(0,150,255,0.6); stroke-width:2; cursor:pointer; transition:0.2s; }
polygon:hover { fill: rgba(0,255,100,0.35); stroke: rgba(0,255,100,0.85); }
#tooltip { position:absolute; padding:6px 10px; background:#222; color:#fff; border-radius:6px; font-size:14px; display:none; pointer-events:none; white-space:nowrap; z-index:999; opacity:0; transition:0.2s; }
.zoom-controls { position:absolute; top:20px; right:20px; display:flex; flex-direction:column; z-index:50; }
.zoom-controls button { width:36px; height:36px; margin-bottom:8px; border:none; border-radius:6px; background:#ffcc33; font-size:20px; cursor:pointer; }
.zoom-controls button:hover { background:#ffd966; }

/* Sidebar */
.sidebar {
    width:277px;
    background: rgba(20,20,20,0.95);
    color:#fff;
    display:flex;
    flex-direction:column;
    padding:30px;
    border-left:1px solid rgba(255,255,255,0.1);
    z-index:100;
    position:absolute;
    top:0;
    right:0;
    bottom:0;
    overflow-y:auto;
}
#floor-buttons {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

#floor-buttons button {
    margin-bottom: 5px;
    padding: 6px 8px;

    border: none;
    border-radius: 4px;
    cursor: pointer;
}
#floor-buttons button:hover {
    background: #ffd966;
}
.floor-btn {
    padding: 8px 12px;
    background-color: #ffcc33;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.floor-btn:hover {
    background-color: #ffd966;
}

.floor-btn.active {
    background-color: #3399ff;
    color: #fff;
}

.floor-label {
    position: absolute;
    left: -98px;
    top: 50%;
    transform: translateY(-50%);
    color: #000000;
    font-weight: bold;
    white-space: nowrap;
    pointer-events: none;

    display: none;       /* по умолчанию скрыта */
}

.floor-label.active {
    display: flex;       /* включаем флекс только для активной */
    background: white;
    width: 90px;
    height: 27px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
}

.logo { font-size:32px; font-weight:700; margin-bottom:40px; text-align:center; }
.auth-form h2 { margin:0 0 15px 0; }
.auth-form input { width:100%; padding:12px; margin-top:10px; background:#333; border:none; color:white; border-radius:6px; font-size:15px; }
.auth-form button {
    margin-top: 15px;
    width: 100%;
    padding: 12px;
    background: #ff9333;
    border: none;
    color: #000;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: 0.2s;
}
.auth-form button:hover { background:#ffd966; }
.description {
    margin-top: 0px;
    flex: 1;
}
.description h3 { margin-top:0; }
.info-panel { background: rgba(255, 255, 255, 0.07); border:1px solid rgba(255,255,255,0.1); padding:18px; border-radius:8px; margin-top:25px; display:none; }
.info-panel h3 { margin:0 0 8px 0; font-size:18px; }
.info-panel p { margin:0; opacity:0.9; }
footer { margin-top:auto; text-align:center; opacity:0.6; font-size:14px; }
	
	
#info-panel {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    display: none;
    color: #fff;
    font-size: 14px;
    margin-bottom: 10px;
}

#info-panel h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

#info-panel p {
    margin: 15px 0;
    opacity: 0.9;
}
#info-panel a {
    color: #000000;
    text-decoration: none;
    padding: 10px 10px;
    background: #ffcc33;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    transition: 0.2s;
    width: 100%;
}
#info-panel a:hover {
    text-decoration: underline;
}
	/* ==== БУРГЕР КНОПКА ==== */
.burger-btn {
    display:none;
    position:fixed;
    top:15px;
    left:15px;
    z-index:200;
    background:#ffcc33;
    color:#111;
    padding:10px 14px;
    border-radius:8px;
    font-size:22px;
    font-weight:700;
    cursor:pointer;
}



.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.tab-link {
    flex: 1;
    padding: 10px;
    background: #444;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    color: white;
}


.tab-link.active {
    background: #ff3333;
    color: black;
}
.tab-link.active:hover {
    background: #ff3333;
    color: black;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}



.auth-form.open {
    max-height: 1000px;
    padding: 20px;
}

.auth-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}	
#login-toggle {
    padding: 12px 20px;
    background: #ffcc33;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: 0.2s;
    width: 100%;
}

#login-toggle:hover {
    background: #ffd966;
}

.auth-form {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s 
ease, padding 0.4s 
ease;
    display: flex;
    flex-direction: column;
    gap: 0px;
    padding: 0 0;
    background: #222;
    border-radius: 6px;
    margin-top: 10px;
}



.auth-form input {
    width: 100%;
    padding: 12px;
    background:#333;
    border:none;
    color:white;
    border-radius:6px;
    font-size:15px;
}

.auth-form button[type="button"] {
    margin-top:10px;
    padding:12px;
    background:#ffcc33;
    border:none;
    color:#000;
    border-radius:6px;
    cursor:pointer;
    font-weight:600;
    font-size:16px;
    transition:0.2s;
}

.auth-form button[type="button"]:hover {
    background:#ffd966;
}

.auth-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin:0 0 15px 0;
}	
#block-popup-overlay {
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.5);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index: 10000;
}

#block-popup {
    background: #222;
    color: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    position: relative;
    text-align: center;
}

#block-popup-close {
    position: absolute;
    top: 10px; right: 15px;
    cursor: pointer;
    font-size: 22px;
    font-weight: bold;
}
#block-popup a {
    color: #ffcc33;
    text-decoration: none;
}
#block-popup a:hover {
    text-decoration: underline;
}	



#rent-popup-overlay {
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.5);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index: 10000;
}

#rent-popup {
    background: #222;
    color: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    position: relative;
}

#rent-popup-close {
    position: absolute;
    top: 10px; right: 15px;
    cursor: pointer;
    font-size: 22px;
    font-weight: bold;
}



/* ==== MOBILE SIDEBAR BOTTOM (до 1024px) ==== */
@media (max-width: 1024px) {
    #map-wrapper {
        right:0 !important;
        bottom:200px !important;
    }
.auth-wrapper {
    position: absolute;
    width: 300px;
    padding: 10px;
    background: #202020;
    border-radius: 10px;

    /* центрирование */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
    .sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        height: 200px;
        width: 100%;
        padding: 20px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        background: rgba(20, 20, 20, 0.95);
        align-items: center;
        justify-content: flex-start;
    }

    .sidebar > * { 
        min-width:250px;
        margin-right:25px; 
    }

    .logo { font-size:26px; margin-bottom:10px; }
    .auth-form { min-width:260px; }
    .description { min-width:300px; }
    .info-panel { min-width:260px; }
}

/* ==== БУРГЕР-МЕНЮ до 768px ==== */
@media (max-width: 768px) {
    .sidebar {
        min-width: auto;
        margin-right: 0px;
        max-width: 100%;
    }
	
	.auth-form.open {
    max-height: 500px;
    min-width: 100%;
}
.auth-wrapper {
    position: relative;
    width: 100%;
    top: 50px;         min-width: auto;
        margin-right: 0;
}
    /* включаем кнопку */
    .burger-btn {
        display:block;
    }
button#mobile-go-btn {
    position: fixed;
    bottom: 0px;
    left: 0px;
    width: 98%;
    margin: 1%;
    height: 60px;
    background: rgb(247 206 85);
    color: rgb(17 17 17);
    font-size: 18px;
    border: none;
    display: none;
    z-index: 1000;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}
    /* скрываем sidebar по умолчанию */
    .sidebar {
        transform:translateX(-100%);
        transition:0.35s ease;
        width:280px;
        top:0;
        bottom:0;
        height:100%;
        padding:25px;
        overflow-y:auto;
        flex-direction:column;
    }

    /* когда открыт */
    .sidebar.open {
        transform:translateX(0);
    }

    /* карта занимает весь экран */
      #map-wrapper {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100%;
    }
}


/* Стили для сайдбара */
.sidebar {
    background-color: #1e1e1e; /* тёмный фон */
    color: #f0f0f0; /* светлый текст */
    overflow-y: auto; /* вертикальная прокрутка */
    padding: 20px;
}

/* Стили скроллбара для Webkit (Chrome, Edge, Safari) */
.sidebar::-webkit-scrollbar {
    width: 6px; /* тонкая полоска */
}

.sidebar::-webkit-scrollbar-track {
    background: #2b2b2b; /* цвет дорожки */
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: #555; /* цвет ползунка */
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #888; /* цвет при наведении */
}

/* Firefox */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: #555 #2b2b2b;
}
