#trip-form, #trip-plan {
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure map container and forms have same width */
#solo-screen .map-container,
#solo-screen #trip-form,
#solo-screen #trip-plan,
#solo-screen #favorite-locations {
    width: 100%;
    max-width: 100%;
}

#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;
}
/* Fullscr
een map styles */
.map-container {
    position: relative;
    /* Make sure the map content never spills outside the card when not
       fullscreen. Google Maps can resize its internal tiles to be larger
       than the host div after a fullscreen toggle; this clips it back to
       the intended container. */
    overflow: hidden;
}

.map-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10000;
    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;
}

/* When map is fullscreen, move button down to avoid status bar */
.map-container.fullscreen-active .map-fullscreen-btn,
.fullscreen-active .map-fullscreen-btn {
    top: max(60px, calc(env(safe-area-inset-top, 10px) + 10px));
}

.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;
}

.map-container.fullscreen-active #map {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    z-index: 9999 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.map-container.fullscreen-active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.map-container.fullscreen-active .map-fullscreen-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 10001;
}

.map-fullscreen-active {
    overflow: hidden;
}

/* 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: 200px;
}

.favorite-node-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.favorite-node-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.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-image {
        height: 90px;
    }
    .favorite-node-card {
        min-height: 220px;
    }
}

@media (min-width: 768px) {
    .favorite-node-image {
        height: 100px;
    }
    .favorite-node-card {
        min-height: 240px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #map {
        height: 300px;
    }
    
    .favorite-node-image {
        height: 100px;
    }
}

/* Prevent horizontal scrolling on the Trip Planner screen */
#solo-screen {
    overflow-x: hidden;
}
