/* ==============================
   MAP PAGE
============================== */

.maps-page main{
    max-width:1800px;
    margin:40px auto;
    padding:0 20px;
}

.maps-page h1,
.maps-page p{
    text-align:center;
}

.maps-page p{
    margin-bottom:30px;
}


/* ==============================
   MAP SELECTOR
============================== */

#map-selector{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:12px;
    margin:30px 0;
}

.map-button{
    padding:10px 24px;
    border:1px solid #555;
    border-radius:6px;
    background:#2f2f2f;
    color:#ddd;
    font-size:16px;
    cursor:pointer;
}

.map-button:hover,
.floor-button:hover{
    background:#444;
}


/* ==============================
   LAYOUT
============================== */

.maps-layout{
    display:grid;
    grid-template-columns:90px 1fr 220px;
    gap:25px;
    align-items:start;
}


/* ==============================
   ELEVATOR
============================== */

#map-elevator{
    display:flex;
    flex-direction:column;
    gap:10px;
    padding:20px;
    background:#222;
    border:1px solid #555;
    border-radius:8px;
}

.floor-button{
    width:60px;
    height:60px;
    border:0;
    border-radius:6px;
    background:#3a3a3a;
    color:#ddd;
    font-size:18px;
    cursor:pointer;
}


/* ==============================
   MAP VIEWER
============================== */

.map-viewer{
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
    background:#222;
    border:1px solid #555;
    border-radius:8px;
    overflow:hidden;
}

#map-container{
    position:relative;
    display:inline-block;
}

#map-image{
    display:block;
    max-width:100%;
    max-height:85vh;
    user-select:none;
    pointer-events:none;
}

#map-layer{
    position:absolute;
    inset:0;
}


/* ==============================
   MARKERS
============================== */

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

.marker-icon{
    display:flex;
    justify-content:center;
    align-items:center;
}

.marker-icon img{
    width:25px;
    height:25px;
    object-fit:contain;
}


/* Pending uniquement sur l'image */

.map-marker.pending .marker-icon img{
    opacity:.55;
    filter:grayscale(.5);
}


/* ==============================
   POPUP
============================== */

.marker-popup{
    position:absolute;
    left:50%;
    bottom:120%;
    transform:translateX(-50%);

    width:220px;
    padding:10px;

    background:#222;
    color:#ddd;

    border:1px solid #555;
    border-radius:8px;

    text-align:center;

    display:none;
    z-index:200;

    opacity:1;
    filter:none;
}

.map-marker.active .marker-popup{
    display:block;
}

.marker-title{
    font-weight:bold;
    margin-bottom:8px;
}

.marker-description{
    font-size:14px;
}

.marker-floor{
    margin-top:8px;
    opacity:.7;
    font-size:12px;
}


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

#map-legend{
    width:220px;
    padding:15px;

    background:#222;

    border:1px solid #555;
    border-radius:8px;

    color:#ddd;
}

#map-legend h3{
    text-align:center;
}

#map-legend label{
    display:flex;
    align-items:center;

    gap:8px;
    margin:8px 0;
}

#map-legend img{
    width:20px;
    height:20px;
}


/* ==============================
   MODAL
============================== */

#action-modal{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,.7);

    display:flex;
    justify-content:center;
    align-items:center;

    z-index:1000;
}

#action-modal.hidden{
    display:none;
}

.action-box{
    width:320px;

    padding:20px;

    background:#222;

    border:1px solid #555;
    border-radius:10px;

    text-align:center;
}

#action-content textarea{
    width:100%;
    min-height:80px;

    background:#111;
    color:#ddd;

    border:1px solid #555;
    border-radius:6px;
}

.action-buttons{
    margin-top:15px;

    display:flex;
    justify-content:center;
    gap:10px;
}

.action-buttons button{
    padding:8px 20px;

    border-radius:6px;
    border:1px solid #555;

    background:#333;
    color:#ddd;

    cursor:pointer;
}


/* ==============================
   WIZARD
============================== */

.category-button,
.marker-type-button{

    width:100%;

    padding:10px;
    margin:5px 0;

    display:flex;
    justify-content:center;
    align-items:center;

    gap:10px;

    background:#333;
    color:#ddd;

    border:1px solid #555;
    border-radius:6px;

    cursor:pointer;
}

.marker-type-button img{
    width:32px;
    height:32px;
}

.location-label{

    color:white;

    background:rgba(0,0,0,.65);

    padding:4px 8px;

    border-radius:6px;

    font-size:10px;

    font-weight:bold;

    white-space:normal;

    max-width:140px;

    text-shadow:
    1px 1px 2px black;

}

/* ==============================
   RESPONSIVE
============================== */

@media(max-width:1200px){

    .maps-layout{
        grid-template-columns:1fr;
    }

    #map-legend{
        width:auto;
    }

}


@media(max-width:900px){

    #map-elevator{
        flex-direction:row;
        flex-wrap:wrap;
        justify-content:center;
    }

}
