/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #e9ecef; /* Light gray background */
    margin: 0;
    padding: 40px; /* Increased padding for better spacing */
}

.container {
    max-width: 800px; /* Wider container for a more spacious layout */
    margin: auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Headings */
h1 {
    text-align: center; /* Centered heading */
    color: #343a40; /* Darker text color */
}

h2 {
    font-size: 24px; /* Adjusts the font size */
    font-weight: 600; /* Makes the text slightly bolder */
    color: #333; /* Sets a dark gray color for the text */
    margin-top: 10px; /* Adds space above the heading */
    margin-bottom: 20px; /* Adds space below the heading */
    text-align: center; /* Centers the text */
    font-family: 'Arial', sans-serif; /* Sets a clean, professional font */
    border-bottom: 2px solid #007BFF; /* Adds a bottom border for emphasis */
    padding-bottom: 10px; /* Adds space below the text within the border */
}

.small-italic {
    font-size: 0.75rem; /* Use rem for responsive font size */
    font-style: italic; /* Italicizes the text */
    color: #555;
    display: block; /* Ensures it appears on a new line */
    text-align: center; /* Centers the text below the heading */
}

/* Form Styles */
form {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping in smaller screens */
    justify-content: space-between; /* Space between fields */
}

.form-group {
    display: flex;
    flex-direction: column; /* Stack label and input vertically */
    margin-right: 20px; /* Space between groups */
    flex-basis: calc(25% - 15px); /* Control width of each field (adjust as needed) */
    margin-bottom: 20px; /* Space below each group */
}

label {
    margin-bottom: 5px;
    font-weight: bold; /* Bold labels for better visibility */
    color: #495057; /* Slightly darker label color */
}

select, input[type="text"], input[type="number"] {
    padding: 12px; /* Increased padding for better touch targets */
    border: 1px solid #ced4da;
    border-radius: 5px;
    width: 100%; /* Make inputs take full width of the group */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); /* Subtle inner shadow */
}

select:focus, input[type="text"]:focus, input[type="number"]:focus {
    border-color: #80bdff; /* Change border color on focus */
    outline: none; /* Remove default outline */
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* Add glow effect on focus */
}

/* Button Styles */
.button-container {
    display: flex;
    justify-content: center; /* Centers the button horizontally */
    align-items: center;     /* Centers the button vertically (if needed) */
    width: 100%;             /* Make container full width */
    margin-top: 20px;       /* Space above the button */
}

button {
    padding: 12px;
    border: none;
    border-radius: 5px;
    background-color: #007bff; /* Bootstrap primary color */
    color: white;
    cursor: pointer;
    font-size: 16px; /* Increased font size for readability */
    transition: background-color 0.3s ease; /* Smooth transition for hover effect */
    flex: 1; /* Make button flexible to take full width of container */
    margin: 0 10px; /* Add some horizontal spacing between buttons if needed */
}

button:hover {
    background-color: #0056b3; /* Darker shade on hover */
}

/* Fieldset Styles */
fieldset {
    width: 100%; /* Ensure fieldsets take full width */
    border: 1px solid #ced4da; /* Add border to fieldsets */
    border-radius: 5px; /* Round corners */
    padding: 15px; /* Padding inside fieldset */
}

fieldset legend {
    font-weight: bold; /* Bold legend text */
}

fieldset label {
    display: block; /* Make labels take full width and align to left */
}

/* Tooltip Styling */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin-left: 5px; /* Space between text and icon */
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position above the text */
    left: 50%;
    margin-left: -100px; /* Center the tooltip */
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.info-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: #4CAF50; /* Change color as needed */
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 14px;
    font-size: 12px;
    font-weight: bold;
}

/* Suggestions Box Styles */
.hidden {
    display: none;
}

#stateSuggestions, #citySuggestions {
    max-height: 150px; /* Adjust height as needed */
    overflow-y: auto; /* Enable vertical scrolling */
    border: 1px solid #ccc; /* Optional: Add border */
    display: none; /* Initially hide suggestions */
}

/* Optional Style for Suggestion Items */
.suggestion-item {
    padding: 10px;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #f0f0f0; /* Highlight on hover */
}

/* Responsive Styles */
@media (max-width: 768px) {
    .form-group {
        flex-basis: 100%; /* Full width on smaller screens */
        margin-right: 0; /* Remove right margin */
        margin-bottom: 15px; /* Adjust bottom margin for spacing */
    }

   h2 {
        font-size: 1.5rem; /* Adjusts size for smaller screens */
   }

   .small-italic {
        font-size: 0.65rem; /* Adjusts size for smaller screens */
   }

   button {
        flex-basis: 100%; /* Full width button on smaller screens */
        margin-top: 10px; /* Add space above the button */
   }
}

@media (max-width: 480px) {
   h2 {
        font-size: 1.25rem; /* Further adjusts size for very small screens */
   }
    
   .small-italic {
        font-size: 0.55rem; /* Further adjusts size for very small screens */
   }
}
