/* =========================================================
HARTA SPITALULUI — PRODUCTION CLEAN CSS
========================================================= */

/* =========================================================
CONTROLS (clădire + etaje)
========================================================= */

.map-controls,
.map-floors {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin: 15px 0;
}

/* BUTOANE */
.map-controls button,
.map-floors button {
padding: 8px 14px;
background: #fff;
border: 1px solid #d0d7e2;
border-radius: 8px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: 0.2s;
}

.map-controls button:hover,
.map-floors button:hover {
background: #eef3fb;
}

.map-controls button.active,
.map-floors button.active {
background: #2d5b9f;
color: #fff;
border-color: #2d5b9f;
}

/* =========================================================
HARTĂ (LAYOUT)
========================================================= */

.map-container {
position: relative;
width: 100%;
max-width: 1400px;
margin: 0 auto;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.map-container img {
width: 100%;
height: auto;
display: block;
}

/* container wide doar pentru hartă */
.section .container:has(.map-container) {
max-width: 95%;
}

/* =========================================================
PUNCTE PE HARTĂ
========================================================= */

.map-point {
position: absolute;
transform: translate(-50%, -50%);
z-index: 10;
cursor: pointer;
}

/* DOT DEFAULT */
.map-point > div:first-child {
width: 14px;
height: 14px;
border-radius: 50%;
background: red;
}

/* HIGHLIGHT (QR) */
.map-point-highlight {
background: #2563eb !important;
width: 18px !important;
height: 18px !important;
box-shadow: 0 0 0 rgba(37, 99, 235, 0.7);
animation: pulse 1.5s infinite;
}

/* ANIMAȚIE */
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
70% { box-shadow: 0 0 0 15px rgba(37, 99, 235, 0); }
100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* =========================================================
LABEL (tooltip)
========================================================= */

.map-point-label {
position: absolute;
top: -28px;
left: 50%;
transform: translateX(-50%);
background: #1f2937;
color: #fff;
font-size: 12px;
padding: 4px 8px;
border-radius: 6px;
white-space: nowrap;
opacity: 0;
transition: 0.2s;
pointer-events: none;
}

.map-point:hover .map-point-label {
opacity: 1;
}

/* =========================================================
LEGENDĂ
========================================================= */

.map-legend {
display: flex;
align-items: center;
gap: 20px;
margin: 10px 0 15px;
font-size: 14px;
}

.legend-item {
display: flex;
align-items: center;
gap: 6px;
}

.legend-dot {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 50%;
}

.legend-normal {
background: red;
}

.legend-active {
background: #2563eb;
}

/* =========================================================
LOCATIE + SEARCH
========================================================= */

.map-current-location {
margin-bottom: 10px;
font-weight: 600;
color: #2d5b9f;
}

.map-search {
margin-bottom: 15px;
}

.map-search input {
width: 100%;
max-width: 400px;
padding: 8px 12px;
border: 1px solid #ccc;
border-radius: 6px;
font-size: 14px;
}

.map-search {
    position: relative;
}

.map-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 5px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    display: none;
    z-index: 50;
}

.map-search-results.active {
    display: block;
}

.map-search-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: 0.2s;
}

.map-search-item:hover {
    background: #f3f6fb;
}

/* ZOOM CONTAINER */
.map-container {
    overflow: hidden;
    position: relative;
    touch-action: none;
}

.map-inner {
    transform-origin: 0 0;
    transition: transform 0.1s ease;
    cursor: grab;
}

.map-inner:active {
    cursor: grabbing;
}

/* RESET BUTTON */
.map-reset-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    background: #fff;
    border: 1px solid #ddd;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.map-reset-btn:hover {
    background: #f3f6fb;
}