html, body {
    height: 100%; /* Ensure html and body take full viewport height */
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    background-color: #f3f4f6; /* bg-gray-100 */

    /* Re-add flex properties, but with column direction */
    display: flex;
    flex-direction: column; /* Stack children vertically */
    align-items: center; /* Center children horizontally */
    min-height: 100vh; /* Ensure body takes at least full viewport height */
    padding: 0; /* Remove any previous padding that might offset alignment */
}

/* Main Container Styles */
.main-container {
    background-color: #ffffff; /* bg-white */
    padding: 2rem; /* p-8 */
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-xl */
    width: 100%; /* w-full */
    max-width: 32rem; /* max-w-lg (corresponds to 512px) */
    margin: 2rem auto; /* This will still help center within the flex item, and give spacing */
    box-sizing: border-box;
    /* To push the main-container down and ensure it fills available space */
    flex-grow: 1;
}

/* Heading Styles (H1) */
.main-heading {
    font-size: 1.875rem; /* text-3xl */
    line-height: 2.25rem;
    font-weight: 700; /* font-bold */
    color: #1f2937; /* text-gray-800 */
    margin-bottom: 1.5rem; /* mb-6 */
    text-align: center;
}

/* Form Styles */
.form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* space-y-4 */
}

.form-label {
    display: block;
    color: #374151; /* text-gray-700 */
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25rem;
    font-weight: 500; /* font-medium */
    margin-bottom: 0.5rem; /* mb-2 */
}

textarea {
    width: 100%; /* Ensure text area takes full width */
    padding: 0.5rem 0.75rem; /* py-2 px-3 */
    border: 1px solid #d1d5db; /* border-gray-300 */
    border-radius: 0.375rem; /* rounded-md */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
    font-family: inherit; /* Inherit font from body */
    font-size: 1rem;
}

/* Form Error Styles */
.form-error {
    color: #ef4444; /* text-red-500 */
    font-size: 0.75rem; /* text-xs */
    line-height: 1rem;
    font-style: italic;
    margin-top: 0.25rem; /* mt-1 */
}

/* Button Styles */
.submit-button {
    width: 100%; /* w-full */
    background-color: #2563eb; /* bg-blue-600 */
    color: #ffffff; /* text-white */
    padding: 0.5rem 1rem; /* py-2 px-4 */
    border-radius: 0.375rem; /* rounded-md */
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* transition duration-300 */
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.submit-button:hover {
    background-color: #1d4ed8; /* hover:bg-blue-700 */
}

.submit-button:focus {
    outline: none; /* focus:outline-none */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5); /* focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 */
}

/* Style the individual divs (which have the state-checkbox-list class from the form widget attrs) */
.state-checkbox-flex-container > div { /* Target direct child divs */
    /* Remove default div styling if any, make them behave like list items */
    list-style: none; /* No bullets */
    padding: 0;
    margin: 0;
    flex: 0 0 200px; /* Adjust width as needed */
    box-sizing: border-box;
}

/* Results Section Styles */
.results-section {
    margin-top: 2rem; /* mt-8 */
    border-top: 1px solid #e5e7eb; /* border-t border-gray-200 */
    padding-top: 1.5rem; /* pt-6 */
}

.results-heading {
    font-size: 1.5rem; /* text-2xl */
    line-height: 2rem;
    font-weight: 600; /* font-semibold */
    color: #1f2937; /* text-gray-800 */
    margin-bottom: 1rem; /* mb-4 */
    text-align: center;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* space-y-4 */
    color: #374151; /* text-gray-700 */
}

.cip-item {
    background-color: #eff6ff; /* bg-blue-50 */
    padding: 0.75rem; /* p-3 */
    border-radius: 0.375rem; /* rounded-md */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
}

.cip-title {
    font-weight: 600; /* font-semibold */
    color: #1e40af; /* text-blue-800 */
}

.cip-code {
    color: #6b7280; /* text-gray-500 */
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25rem;
}

.schools-container {
    margin-top: 0.5rem; /* mt-2 */
    display: flex;
    flex-direction: column;
    gap: 0.25rem; /* space-y-1 */
}

.school-item {
    display: flex;
    align-items: flex-start; /* Align bullet and text at the top */
}

.bullet-point {
    margin-right: 0.5rem; /* mr-2 */
    color: #2563eb; /* text-blue-600 */
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25rem;
    flex-shrink: 0; /* Prevent bullet from shrinking */
    padding-top: 0.05rem; /* Small adjustment for visual alignment */
}

.school-name {
    font-weight: 500; /* font-medium */
    color: #1e3a8a; /* text-blue-900 */
}

.school-info-and-labels {
    display: flex;
    flex-direction: column; /* Stack name/state and labels vertically */
    flex-grow: 1; /* Allow this container to take available space */
}

/* School Labels Container */
.school-labels-container {
    display: flex; /* Arrange labels in a row */
    flex-wrap: wrap; /* Allow labels to wrap to the next line */
    gap: 0.5rem; /* Space between labels */
    margin-top: 0.4rem; /* Add some air between school name and labels */
}

/* Individual School Label */
.school-label {
    background-color: #e0e7ff; /* A lighter shade of blue, like bg-blue-100 */
    color: #3b82f6; /* A slightly darker blue for text, like text-blue-600 */
    padding: 0.2rem 0.6rem; /* Minimal padding for a small tag */
    border-radius: 0.25rem; /* Slightly rounded corners */
    font-size: 0.75rem; /* Smaller font size for subtle tags */
    font-weight: 500; /* Medium weight */
    text-transform: uppercase; /* Uppercase for a crisp look */
    letter-spacing: 0.025em; /* A tiny bit of letter spacing */
   /* border: 1px solid #c5d7f7; */
}


    /* Tooltip Container */
    .tooltip-container {
        position: relative; /* Establishes positioning context for the tooltip */
        display: inline-block; /* Allows it to sit inline with text, but still have dimensions */
        cursor: help; /* Indicates interactivity */
    }

    /* Question Mark Icon */
    .question-mark-icon {
        font-size: 0.875rem; /* text-sm, small and subtle */
        font-weight: 700; /* font-semibold */
        color: #6b7280; /* text-gray-500, muted */
        border: 1px solid #d1d5db; /* border-gray-300 */
        border-radius: 50%; /* Perfect circle */
        width: 1.25rem; /* Fixed width */
        height: 1.25rem; /* Fixed height */
        display: inline-flex; /* Use flex for perfect centering of the '?' */
        align-items: center;
        justify-content: center;
        margin-left: 0.5rem; /* A little air to the left of surrounding text */
        transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
        background-color: #ffffff; 
    }

    .tooltip-container:hover .question-mark-icon {
        color: #2563eb; /* text-blue-600 on hover */
        border-color: #2563eb; /* border-blue-600 on hover */
    }

    /* Tooltip Description Box */
    .tooltip-description {
        visibility: hidden; /* Hidden by default */
        opacity: 0; /* Hidden by default */
        position: absolute;
        bottom: calc(100% + 0.75rem); /* Position above the question mark with some air */
        left: 50%; /* Center horizontally */
        transform: translateX(-50%); /* Adjust for perfect centering */
        background-color: #1f2937; /* bg-gray-800, dark background for contrast */
        color: #f9fafb; /* text-gray-50, light text */
        padding: 0.75rem 1rem; /* p-3 px-4, good internal padding */
        border-radius: 0.375rem; /* rounded-md */
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* subtle shadow */
        min-width: 12rem; /* Minimum width to prevent squishing */
        max-width: 20rem; /* Max width for readability on larger screens */
        text-align: center;
        font-size: 0.875rem; /* text-sm */
        line-height: 1.4; /* Slightly more line height for readability */
        white-space: normal; /* Allow text to wrap naturally */
        z-index: 10; /* Ensure it appears above other content */
        transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    }

    /* Arrow for the tooltip (optional, but adds a nice touch) */
    .tooltip-description::after {
        content: '';
        position: absolute;
        top: 100%; /* Position at the bottom of the tooltip box */
        left: 50%;
        transform: translateX(-50%);
        border-width: 0.5rem; /* Size of the arrow */
        border-style: solid;
        border-color: #1f2937 transparent transparent transparent; /* Matches tooltip background */
    }

    /* Show tooltip on hover */
    .tooltip-container:hover .tooltip-description {
        visibility: visible;
        opacity: 1;
    }

    /* Media query for smaller screens / phones */
    @media (max-width: 640px) { /* Tailwind's 'sm' breakpoint */
        .tooltip-description {
            max-width: 90vw; /* Take up most of the viewport width on small screens */
            min-width: unset; /* Remove min-width constraint */
            left: 50%; /* Re-center */
            transform: translateX(-50%); /* Re-adjust for centering */
            /* You might want to adjust bottom/top positioning if it overlaps with other elements */
            /* For example, if it's at the very top of the screen, maybe position it below */
            /* top: calc(100% + 0.75rem); */
            /* bottom: unset; */
            /* .tooltip-description::after { border-color: transparent transparent #1f2937 transparent; } */
        }
    }

/* CSS for the top menu */
  .top-menu {
    background-color: #f2f2f2; /* Light grey background color */
    color: #558ecb; /* Text color */
    display: flex; /* Flexbox layout */
    justify-content: flex-start; /* Align items to the left */
    align-items: center; /* Center items vertically */
    height: 60px; /* Adjust height as needed */
    padding: 0 20px; /* Padding around menu */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Shadow for a lifted effect */
    width: 100%; 
    position: sticky;
    top: 0;
    z-index: 1000;
}
  
  .top-menu a {
    color: #558ecb; /* Text color */
    font-weight: bold;
    text-decoration: none; /* Remove underline */
    padding: 10px 20px; /* Padding inside links */
    border-radius: 8px; /* Rounded corners */
    background-color: #ddd; /* Light grey background */
    transition: background-color 0.3s ease; /* Smooth transition on hover */
    margin-right: 10px; /* Margin between buttons */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Button shadow */

    display: flex; /* Make the link a flex item */
    justify-content: flex-start; /* Align its content (the text) to the start */
    width: 100%; /* Allow it to take full width within its flex parent */
    max-width: 32rem; /* Match the max-width of your .main-container */
    margin: 0 auto; /* Center the link container within the menu bar */
    box-sizing: border-box; 
  }
  
  .top-menu a:hover {
    background-color: #ccc; /* Darker grey background color on hover */
  }