/*
 * فایل استایل برای افزونه نقشه پروژه‌های ایران
 * نسخه: 1.5 (نهایی)
 */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;700&display=swap');

#map-root-container {
    font-family: 'Vazirmatn', sans-serif;
    text-align: center;
    margin: auto;
    width: 100%;
}

#map-root-container h1 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
}

.legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px 25px;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-color { width: 18px; height: 18px; border-radius: 4px; }

.map-container {
    position: relative;
    width: 100%;
    border: none;
    box-shadow: none;
    background-color: transparent;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    aspect-ratio: 1 / 1;
}

.pins-wrapper { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }

.pin {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid #ffffff;
    margin-top: -11px;
    margin-left: -11px;
}

.pin:hover { transform: rotate(-45deg) scale(1.3); z-index: 10; }

.residential { background-color: #90ee90; }
.commercial { background-color: #f7d98e; }
.power-plant { background-color: #f08080; }

.modal{display:none;position:fixed;z-index:1000;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgba(0,0,0,.65);align-items:center;justify-content:center}
.modal-content{background-color:#fff;margin:auto;padding:25px;border-radius:10px;width:90%;max-width:450px;box-shadow:0 5px 20px rgba(0,0,0,.3);text-align:center;position:relative;animation:fadeIn .4s cubic-bezier(.25,.46,.45,.94)}
@keyframes fadeIn{from{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}
.close-button{color:#aaa;position:absolute;top:10px;left:20px;font-size:28px;font-weight:700;cursor:pointer;transition:color .2s}
.close-button:focus,.close-button:hover{color:#000}
#modal-img{width:100%;height:220px;object-fit:cover;border-radius:8px;margin-bottom:15px;background-color:#f0f0f0}
#modal-title{margin-top:0;margin-bottom:10px;font-size:1.8rem;color:#333;font-weight:700}
#modal-location,
#modal-year{margin:0 0 15px;font-size:1.1rem;color:#666}
#modal-year{margin-bottom:25px}
.project-button{display:inline-block;background-color:#007bff;color:#fff;padding:12px 28px;text-decoration:none;border-radius:5px;font-weight:700;transition:background-color .3s,transform .2s}
.project-button:hover{background-color:#0056b3;transform:translateY(-2px)}

@media (max-width:600px){
    #map-root-container{
        width:90vw;
        max-width:90vw!important;
        margin:0 auto;
    }
    #map-root-container h1{font-size:1.8rem}
    .legend{
        font-size:.8rem;
        gap:10px 15px;
        flex-wrap:nowrap;
        justify-content:space-between;
    }
    .legend-item{flex:1;justify-content:center}
    .pin{width:18px;height:18px;margin-top:-9px;margin-left:-9px}
    #modal-title{font-size:1.5rem}
    #modal-year{font-size:1rem}
}