/* =========================
   LAYOUT GENERAL
========================= */

body {
    padding-top: 100px; /* pentru header fixed */
    background: #f4f6f8;
}

.map-page {
    display: flex;
    gap: 30px;
    padding: 30px 5%;
    min-height: calc(100vh - 160px);
}

/* =========================
   PANEL STÂNGA – SCOR
========================= */

.left-panel {
    width: 260px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    height: fit-content;
}

.left-panel h3 {
    margin-bottom: 10px;
    font-size: 22px;
}

.left-panel .score {
    font-size: 26px;
    font-weight: bold;
    color: #1e88e5;
    margin-bottom: 15px;
}

.left-panel ul {
    list-style: none;
}

.left-panel li {
    padding: 6px 0;
    font-size: 16px;
    border-bottom: 1px solid #eee;
}

.left-panel2 {
    width: 260px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    height: fit-content;
}
.left-panel2 h3 {
    margin-bottom: 10px;
    font-size: 22px;
}
.left-panel2 ul {
    list-style: none;
}
.left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =========================
   ZONA HARTĂ
========================= */

.map-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =========================
   CONTROALE RUTĂ
========================= */

.route-controls {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.route-controls input {
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 15px;
    min-width: 200px;
}

/* =========================
   CONTAINER HARTĂ
========================= */

.map-wrapper {
    background: #fff;
    padding: 15px;
    border-radius: 16px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.12);
}

#map {
    width: 100%;
    height: 65vh;
    border-radius: 12px;
}

/* =========================
   LEGENDĂ HARTĂ
========================= */

#legend {
    background: white;
    padding: 12px;
    margin: 10px;
    border-radius: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

#legend img {
    vertical-align: middle;
    margin-right: 6px;
}

/* =========================
   MODAL TRASEE SALVATE
========================= */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 14px;
    padding: 25px;
    position: relative;
    animation: pop 0.3s ease;
}

@keyframes pop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
}
.close-modal:hover {
    color: #e74c3c;
    transform: scale(1.1);
}


/* =========================
   CARD TRASEU SALVAT
========================= */

.saved-route {
    background: #f8f9fb;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
}

.saved-route h4 {
    margin-bottom: 8px;
}

.saved-route p {
    font-size: 14px;
    margin: 4px 0;
}

.delete-route {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
    font-size: 18px;
    color: #e74c3c;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
    .map-page {
        flex-direction: column;
    }

    .left-panel {
        width: 100%;
    }
}

#resetRoute {
    border: 1px solid #1e88e5;
    color: #1e88e5;
    background: #fff;
}

#resetRoute:hover {
    background: #e3f2fd;
}

.route-title {
    cursor: pointer;
    color: #1e88e5;
}
.route-title:hover {
    text-decoration: underline;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}
.btn-danger.small {
    font-size: 13px;
    margin-bottom: 10px;
}
.btn-danger:hover {
    background: #c0392b;
}

.delete-route {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
}

/* tooltip */
.delete-route::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    right: 120%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.delete-route:hover::after {
    opacity: 1;
}

.delete-route:hover {
    color: #c0392b;
    transform: scale(1.2);
}

.favorite-route {
    position: absolute;
    top: 2px;          /* puțin mai sus ca să fie centrat */
    right: 42px;
    cursor: pointer;
    font-size: 30px;    /* ⭐ MAI MARE (era 20px) */
    color: #ccc;
    transition: transform 0.2s ease, color 0.2s ease;
}

.favorite-route:hover {
    transform: scale(1.2);
    color: #f1c40f;
}

.favorite-route.active {
    color: #f1c40f;
}

