body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 20px;
}

.toggle-button {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 10px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.toggle-button:hover {
    background-color: #0056b3;
}

.travel-time-container {
    display: inline-block;
    border: 2px solid #007BFF;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    background-color: #f8f9fa;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.travel-time-container:hover {
    background-color: #e2e6ea;
}

.details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.recalculate-btn {
    margin-top: 10px;
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.recalculate-btn:hover {
    background-color: #218838;
}

/* Add extra spacing ONLY around the "Camera View" heading */
.camera-view-heading {
    margin-top: 40px;  /* Extra space above */
    margin-bottom: 20px;  /* Extra space below */
    font-size: 1.5em;
    font-weight: bold;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.camera {
    text-align: center;
}

.camera-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.camera h2 {
    font-size: 1.2em;
    width: 250px;
    margin: 0 auto;
}

.camera img {
    width: 100%;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.camera img:hover {
    transform: scale(1.05);
}

/* Alert Styles */
#alerts-container {
    margin-top: 20px;
    padding: 10px;
}

#alerts {
    display: none;
    background-color: #ffeb3b;
    padding: 10px;
    border-radius: 5px;
}

.alert-title {
    font-weight: bold;
    background-color: #ffeb3b;
    padding: 5px;
    display: block;
    margin-bottom: 5px;
}

/* Overlay for Camera Images */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1000;
}

/* Overlay Content */
.overlay-content {
    text-align: center;
}

/* Camera Title in Overlay */
#overlay-title {
    color: white;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.overlay-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

/* Navigation Buttons (Up and Down Arrows) */
.nav-button {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s ease;
    position: absolute;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 1);
}

/* Positioning of Navigation Buttons */
#prevButton {
    top: 10%;
}

#nextButton {
    bottom: 10%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

.camera {
    background: #ffffff;  /* White background to match the travel time div */
    padding: 15px;  /* Same padding as the travel time div */
    border-radius: 8px;  /* Rounded corners for consistency */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);  /* Subtle shadow effect */
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    max-width: 800px;  /* Restrict width to keep a clean layout */
    margin: 20px auto;  /* Center the camera div */
}

.camera:hover {
    transform: scale(1.02);  /* Slight zoom effect on hover */
    box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.25);  /* Enhanced shadow on hover */
}

.camera img {
    width: 100%;  /* Ensure images take up full width */
    height: auto;
    border-radius: 8px;  /* Rounded corners on images */
    display: block;
}
