#rv-route-planner {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
    color: #0f1a2b;
}

/* Sidebar */
#sidebar {
    width: 320px;
    background: #e8f1ff;
    border-right: 1px solid #c9d7f2;
    padding: 12px;
    overflow-y: auto;
    min-height: 100%;
    max-height: 1350px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(17, 63, 120, 0.1);
}

#sidebar h3 {
    margin-top: 0;
    font-size: 18px;
    border-bottom: 1px solid #c9d7f2;
    padding-bottom: 6px;
    color: #1557b3;
}

#sidebar-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0 12px;
    font-size: 14px;
}

#poi-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#poi-list li {
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #c9d7f2;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(17, 63, 120, 0.08);
}

.poi-item {
    display: flex;
    gap: 10px;
}

.poi-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #c9d7f2;
}

.poi-info {
    font-size: 14px;
    line-height: 1.4;
}

.poi-info a {
    color: #1e6bd6;
    text-decoration: none;
    font-weight: 600;
}

.poi-info a:hover {
    text-decoration: underline;
}

/* Main content */
#main {
    flex: 1;
    padding: 12px;
}

/* Form */
#route-form {
    margin-bottom: 10px;
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #c9d7f2;
    box-shadow: 0 2px 6px rgba(17, 63, 120, 0.08);
}

#route-form .form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
}

#route-form label {
    margin-bottom: 6px;
    font-weight: bold;
    color: #1557b3;
}

#route-form .start-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#route-form input,
#route-form select {
    padding: 10px;
    border: 1px solid #c9d7f2;
    border-radius: 8px;
    background: #f9fbff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

#route-form input:focus,
#route-form select:focus {
    outline: none;
    border-color: #1e6bd6;
    box-shadow: 0 0 0 3px rgba(30, 107, 214, 0.2);
}

#route-form button {
    padding: 12px 16px;
    background: #1e6bd6;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.06s ease;
    box-shadow: 0 4px 10px rgba(17, 63, 120, 0.15);
}

#route-form button:hover {
    background: #1557b3;
}

#route-form button:active {
    transform: translateY(1px);
}

/* Destinations wrapper */
#destinations-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.destination-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.destination-wrapper input.destination {
    flex: 1;
}

.remove-destination {
    background: #ffdddd;
    border: 1px solid #cc0000;
    color: #cc0000;
    border-radius: 6px;
    cursor: pointer;
    padding: 6px 10px;
    font-weight: bold;
    transition: background 0.2s ease;
}

.remove-destination:hover {
    background: #ffcccc;
}

#destinations-wrapper .destination {
    padding: 10px;
    border: 1px solid #c9d7f2;
    border-radius: 8px;
    background: #f9fbff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

#destinations-wrapper .destination:focus {
    outline: none;
    border-color: #1e6bd6;
    box-shadow: 0 0 0 3px rgba(30, 107, 214, 0.2);
}

/* Add Destination button */
#add-destination-btn {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f0f6ff;
    border: 1px dashed #1e6bd6;
    border-radius: 6px;
    color: #1e6bd6;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

#add-destination-btn:hover {
    background: #e0edff;
}

/* Map */
#map {
    width: 100%;
    height: 600px;
    border: 2px solid #c9d7f2;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(17, 63, 120, 0.1);
}

/* Legend */
#legend {
    margin-top: 10px;
    font-size: 13px;
    color: #0f1a2b;
    display: flex;
    gap: 20px;
    align-items: center;
}

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

#legend img {
    width: 16px;
    height: 16px;
}

/* Status */
#status {
    margin-bottom: 15px;
    padding: 12px;
    background: #f9fbff;
    border: 1px solid #c9d7f2;
    border-radius: 8px;
    font-size: 14px;
    color: #0f1a2b;
}
#status h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #1557b3;
}
#status ul {
    list-style: none;
    padding-left: 0;
}
#status li {
    margin: 4px 0;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    #rv-route-planner {
        flex-direction: column;
    }

    #main {
        order: 1; /* mapa i forma gore */
        padding: 0;
    }

    #sidebar {
        order: 2; /* sidebar ide ispod */
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #c9d7f2;
        margin-top: 15px;
    }

    #map {
        height: 400px;
    }

    #route-form {
        padding: 12px;
    }

    #legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}