#trip-form, #trip-plan {
    margin-bottom: 20px;
}

#stopsTable {
    width: 100%;
    border-collapse: collapse;
}

#stopsTable th, #stopsTable td {
    border: 1px solid #ddd;
    padding: 8px;
}

#stopsTable th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: left;
    background-color: #f2f2f2;
}

#map-url-container {
    margin-top: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#mapUrl {
    word-break: break-all;
}
/* Map container styles */
.map-container {
    position: relative;
    /* Make sure the map content never spills outside the card when not
       expanded. Leaflet can resize its internal tiles to be larger
       than the host div after a toggle; this clips it back to
       the intended container. */
    overflow: hidden;
    /* Keep the map and its expand button above surrounding tiles */
    z-index: 10;
}

.map-container.map-expanded {
    /* When expanded, ensure the map sits on top of any overlapping content */
    z-index: 20;
}

/* Map starts small and expands when toggled */
#map {
    height: 10rem !important; /* 160px - half size */
    min-height: 10rem;
    transition: height 0.3s ease;
}

#map.map-expanded {
    height: 20rem !important; /* 320px - full size */
    min-height: 20rem;
}

/* Map expand button - must be above Leaflet controls (z-index 1000) */
.map-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1001;
    background: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-fullscreen-btn:hover {
    background: #f0f0f0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.map-fullscreen-btn svg {
    display: block;
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* Favorites section styles */
.favorite-node-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 110px;
}

.favorite-node-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.favorite-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

.favorite-heart {
    color: #ef4444;
    fill: #ef4444;
}

.favorite-heart-outline {
    color: #94a3b8;
    fill: none;
}

/* Responsive adjustments for favorites */
@media (min-width: 640px) {
    .favorite-node-card {
        min-height: 115px;
    }
}

@media (min-width: 768px) {
    .favorite-node-card {
        min-height: 120px;
    }
}

/* Prevent horizontal scrolling on the Trip Planner screen */
#solo-screen {
    overflow-x: hidden;
}
