#urdg-container {
    width: 95%; /* Use width as a percentage */
    max-width: 1600px;
    margin: 30px auto;
    padding: 30px;
    border-radius: 0px;
    background-color: #222;
    color: #eee;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#urdg-container h2 {
    text-align: left;
    margin-bottom: 30px;
    color: #fff;
}

.urdg-form {
    display: grid; /* Use grid for better alignment */
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Responsive grid */
    gap: 20px;
    align-items: end;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #333;
    border-radius: 0px;
}

.urdg-input-group {
    display: flex;
    flex-direction: column;
}

.urdg-input-group label {
    font-weight: normal;
    margin-bottom: 8px;
    font-size: 1em;
    color: #ccc;
}

#urdg-postcode-input,
#urdg-radius-input,
#urdg-type-input,
#urdg-start-date,
#urdg-end-date {
    padding: 12px;
    border: 1px solid #555;
    border-radius: 0px;
    height: auto;
    background-color: #444;
    color: #eee;
    min-width: 120px;
}

/* Style for the date picker icon in Chrome/Edge */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

#urdg-submit-btn {
    padding: 12px 25px;
    border: none;
    background-color: #00ff1e;
    color: #222;
    border-radius: 0px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    height: 48px; /* Match input height */
    font-size: 1.1em;
    width: 100%;
}
.urdg-input-group:last-of-type { /* Target the button group */
    align-self: end;
}


#urdg-submit-btn:hover {
    background-color: #00bf16;
}

#urdg-chart-wrapper {
    position: relative;
    height: 500px;
    padding: 20px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 0px;
}

.urdg-message {
    text-align: center;
    color: #aaa;
    font-size: 1.1em;
}

/* ==========================================================================
   Mobile Responsive Styles
   ========================================================================== */

/* Apply these styles on screens 768px wide or smaller (tablets and phones) */
@media (max-width: 768px) {

    /* Reduce the main container's padding */
    #urdg-container {
        padding: 15px;
    }

    /* Make the heading slightly smaller */
    #urdg-container h2 {
        font-size: 1.5em; 
    }

    /* Change the form layout from a grid to a single column */
    .urdg-form {
        grid-template-columns: 1fr; /* Stack all form items vertically */
        gap: 15px;
        padding: 15px;
    }
    
    /* Ensure the button has some space when it's the last item */
    #urdg-submit-btn {
        margin-top: 5px;
    }

    /* Adjust the chart's height to be proportional to its width */
    #urdg-chart-wrapper {
        height: auto; /* Remove the fixed height */
        aspect-ratio: 1 / 1; /* Make it square-ish, good for mobile */
        padding: 10px;
    }
}