    /* Fix for the location input row to prevent text cutoff */
    .location-row {
        align-items: stretch !important; /* Ensure all elements have same height */
    }

    .location-row .col-3,
    .location-row .col-2,
    .location-row .col-7 {
        display: flex;
        align-items: center;
    }

    /* Ensure the radius input is properly sized */
    .location-row .col-3 input {
        min-width: 60px;
        text-align: center;
    }

    /* Make the connector text properly centered */
    .location-row .connector-text {
        white-space: nowrap;
        color: #333;
        font-weight: 500;
        font-size: 14px; /* Slightly smaller */
        display: flex;
        align-items: center;
        justify-content: center;
        height: 38px;
        padding: 0 5px; /* Add some padding */
    }

    /* Fix the ZIP input to not be cut off */
    .location-row .col-7 input {
        width: 100%;
        min-width: 0; /* Allow it to shrink if needed */
    }

    /* Improved button group styling for iframe */
    .filter-actions {
        display: flex;
        gap: 8px;
        align-items: stretch;
    }

    .filter-actions .search-btn {
        flex: 1;
        min-width: 100px;
        white-space: nowrap;
    }

    .filter-actions .btn-group {
        display: flex;
        gap: 0;
    }

    .filter-actions .btn-group .btn {
        border-radius: 0;
        border-left: 1px solid #dee2e6;
    }

    .filter-actions .btn-group .btn:first-child {
        border-top-left-radius: 0.375rem;
        border-bottom-left-radius: 0.375rem;
        border-left: 1px solid #dee2e6;
    }

    .filter-actions .btn-group .btn:last-child {
        border-top-right-radius: 0.375rem;
        border-bottom-right-radius: 0.375rem;
    }

    /* Improved More/Fewer Filters button for iframe */
    #advanced-filters-toggle {
        transition: all 200ms ease-in-out;
        border: 1px solid #0dcaf0;
        color: #0dcaf0;
        background: white;
        font-size: 13px; /* Slightly smaller font */
        padding: 6px 12px; /* Tighter padding */
        white-space: nowrap;
        min-width: 90px; /* Minimum width to prevent jumping */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #advanced-filters-toggle:hover {
        background-color: #0dcaf0;
        color: white;
    }

    #advanced-filters-icon {
        transition: transform 300ms ease-in-out;
        font-size: 12px;
        margin-right: 4px;
    }

    #advanced-filters-icon.rotated {
        transform: rotate(180deg);
    }

    #advanced-filters-text {
        font-size: 12px;
        font-weight: 600;
    }

    /* Reset button improvements */
    .btn-group .btn[title="Reset"] {
        min-width: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Make the main search row more compact for iframe */
    .main-search-row {
        margin-bottom: 10px;
    }

    .main-search-row .form-label {
        font-size: 13px;
        margin-bottom: 3px;
        font-weight: 600;
    }

    /* Jr. Shows checkbox row styling */
    .jr-shows-row {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #e9ecef;
    }

    .jr-shows-row .form-check-label {
        font-size: 13px;
        color: #666;
    }

    /* Mobile responsive improvements for iframe */
    @media (max-width: 768px) {
        .location-row .col-3,
        .location-row .col-2,
        .location-row .col-7 {
            width: 100%;
            margin-bottom: 8px;
        }

        .location-row .col-2.text-center {
            text-align: left !important;
            padding-left: 12px;
        }

        .filter-actions {
            flex-direction: column;
            gap: 8px;
        }

        .filter-actions .btn-group {
            width: 100%;
        }

        .filter-actions .btn-group .btn {
            flex: 1;
        }

        #advanced-filters-text {
            display: inline; /* Show text on mobile too */
        }
    }

    /* Compact the Advanced Filters section for iframe */
    .advanced-filters-container {
        overflow: hidden;
        transition: max-height 400ms ease-in-out, opacity 300ms ease-in-out;
        max-height: 0;
        opacity: 0;
        background-color: rgba(248, 249, 250, 0.7);
        border-radius: 6px;
        margin-top: 12px;
        border: 1px solid #e9ecef;
    }

    .advanced-filters-container.expanded {
        max-height: 800px; /* Reduced from 1000px */
        opacity: 1;
    }

    .advanced-filters-content {
        padding: 15px; /* Reduced from 20px */
        padding-top: 12px;
    }

    .advanced-filters-content h6 {
        font-size: 14px;
        margin-bottom: 10px; /* Reduced spacing */
        color: #495057;
        font-weight: 600;
    }

    .advanced-filters-content .mb-4 {
        margin-bottom: 1rem !important; /* Reduced spacing between sections */
    }

    .advanced-filters-content .form-label {
        font-size: 12px;
        margin-bottom: 3px;
    }

    /* Tighter spacing for form controls in advanced section */
    .advanced-filters-content .form-control,
    .advanced-filters-content .form-select {
        height: 36px; /* Slightly smaller than main controls */
        font-size: 13px;
    }

    /* Make the search container more compact for iframe */
    .search-container {
        padding: 12px; /* Reduced from 15px */
        margin-bottom: 15px; /* Reduced from 20px */
    }
            body {
                overflow-x: hidden;
            }

            .search-area-button {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                z-index: 1000;
                background-color: #fff;
                border: 2px solid #4CAF50;
                color: #4CAF50;
                font-weight: 600;
                padding: 8px 16px;
                border-radius: 24px;
                box-shadow: 0 2px 5px rgba(0,0,0,0.2);
                cursor: pointer;
                opacity: 0;
                transition: opacity 0.3s ease-out;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .search-area-button.visible {
                opacity: 1;
            }

            .search-area-button:hover {
                background-color: #4CAF50;
                color: #fff;
            }

            .search-area-button i {
                margin-right: 8px;
            }

            /* Search bar container */
            .search-container {
                background-color: #f8f9fa;
                padding: 15px;
                border-radius: 8px;
                box-shadow: 0 2px 8px rgba(0,0,0,0.1);
                margin-bottom: 20px;
            }

            /* Form label styling */
            .search-container .form-label {
                font-weight: 500;
                color: #555;
                margin-bottom: 5px;
            }

            /* Form control heights for consistency */
            .form-control, .form-select {
                height: 38px;
                color: #333;
                font-weight: 500;
                font-size: 15px;
                border: 1px solid #ccc;
            }

            /* Focus states */
            .form-control:focus, .form-select:focus {
                border-color: #4CAF50;
                box-shadow: 0 0 0 0.25rem rgba(76, 175, 80, 0.25);
            }

            /* Radius input styling */
            #radius {
                text-align: center;
                font-weight: 500;
                color: #333;
            }

            /* Connector text styling */
            .connector-text {
                white-space: nowrap;
                color: #333;
                font-weight: 500;
                font-size: 15px;
                display: flex;
                align-items: center;
                justify-content: center;
                height: 38px;
            }

            /* Search button styling */
            .search-btn {
                background-color: #4CAF50;
                border-color: #4CAF50;
                height: 38px;
                white-space: nowrap;
                min-width: 140px;
            }

            .search-btn:hover {
                background-color: #3e8e41;
                border-color: #3e8e41;
            }

            /* Button group styling */
            .btn-group .btn {
                min-width: 44px;
                height: 38px;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            /* Map container */
            .map-container {
                height: 600px;
                width: 100%;
                border-radius: 8px;
                overflow: hidden;
                box-shadow: 0 2px 8px rgba(0,0,0,0.1);
                margin-bottom: 20px;
                position: relative;
            }

            /* Map element */
            #map {
                height: 100%;
                width: 100%;
            }

            /* Production listing under map */
            .production-list-container {
                background-color: white;
                border-radius: 8px;
                box-shadow: 0 2px 8px rgba(0,0,0,0.1);
                padding: 15px;
                margin-bottom: 20px;
            }

            .production-table {
                width: 100%;
            }

            /* Map info window */
            .map-info-window {
                min-width: 250px;
                max-width: 300px;
            }

            .map-info-title {
                font-weight: bold;
                font-size: 16px;
                margin-bottom: 5px;
                color: #333;
            }

            .map-info-dates {
                margin-bottom: 5px;
                color: #666;
            }

            /* Optimizations for iframe display */
            body {
                overflow-x: hidden;
                padding: 0;
                margin: 0;
                font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            }

            .search-container, .map-container, .production-list-container {
                box-shadow: none;
                border: 1px solid #e6e6e6;
            }

            /* Input group styling */
            .input-group-text {
                background-color: #f8f9fa;
                color: #495057;
                font-weight: 500;
                border: 1px solid #ccc;
            }

            /* Button styling */
            .btn {
                padding: 8px 16px;
                font-weight: 500;
            }

            /* Table header improvements */
            .production-table thead th {
                font-weight: 600;
                color: #333;
                background-color: #f8f9fa !important;
                border-bottom: 2px solid #e9ecef;
                padding: 12px 8px;
            }

            /* Table row improvements */
            .production-table td {
                vertical-align: middle;
                padding: 8px;
                color: #333;
            }

            /* Ensure no padding at top */
            .container-fluid {
                padding-top: 10px;
                padding-left: 10px;
                padding-right: 10px;
            }

            /* Better contrast for muted text */
            .text-muted {
                color: #555 !important;
                font-weight: 500;
            }

            /* Section headers */
            h1, h2, h3, h4, h5, h6 {
                color: #333;
                font-weight: 600;
            }

            /* Fix placeholder text contrast */
            ::placeholder {
                color: #767676 !important;
                opacity: 1 !important;
            }

            /* Make sure there's no extra white space at the top */
            .row:first-child {
                margin-top: 0;
            }

            /* Improve the spacing of the map and results */
            .map-container {
                margin-bottom: 15px;
                height: 500px;
            }

            /* Make table more compact for iframe view */
            .production-table th,
            .production-table td {
                padding: 6px 8px;
                font-size: 14px;
            }

            /* Loading overlay styling */
            #map-loading-overlay {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background-color: rgba(255, 255, 255, 0.8);
                display: flex;
                justify-content: center;
                align-items: center;
                z-index: 1000;
                transition: opacity 0.3s ease-out;
            }

            #map-loading-overlay.hidden {
                opacity: 0;
                pointer-events: none;
            }

            .spinner-container {
                text-align: center;
                background-color: white;
                padding: 20px;
                border-radius: 8px;
                box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            }

            .spinner-border {
                width: 3rem;
                height: 3rem;
                color: #4CAF50 !important;
            }

            .loading-text {
                font-weight: 500;
                color: #333;
            }

            /* Better hover effects for rows */
            .production-row {
                transition: background-color 0.2s ease;
            }

            .production-row:hover {
                background-color: #f0f9f0 !important;
                cursor: pointer;
            }

            /* Improve map marker popups */
            .leaflet-popup-content {
                max-height: 300px;
                overflow-y: auto;
            }

            .map-info-window {
                padding: 5px;
            }

            .map-info-window .btn {
                margin-top: 10px;
            }

            /* Fix any leaflet map sizing issues */
            .leaflet-container {
                height: 100% !important;
                width: 100% !important;
            }

            /* Improve map controls visibility */
            .leaflet-control-zoom {
                box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
            }

            .leaflet-control-zoom a {
                width: 36px !important;
                height: 36px !important;
                line-height: 36px !important;
                font-size: 18px !important;
            }

            /* Improve marker clusters appearance */
            .marker-cluster {
                background-color: rgba(76, 175, 80, 0.6);
            }

            .marker-cluster div {
                background-color: rgba(76, 175, 80, 0.8);
                color: white;
                font-weight: bold;
            }

            /* Mobile responsive improvements */
            @media (max-width: 768px) {
                .search-container {
                    padding: 12px;
                }

                /* Stack form elements on mobile */
                .col-md-3, .col-md-6 {
                    width: 100%;
                    margin-bottom: 15px;
                }

                /* Location row adjustments for mobile */
                .col-md-6 .row.g-2 {
                    display: flex;
                    flex-wrap: wrap;
                }

                .col-md-6 .col-3,
                .col-md-6 .col-2,
                .col-md-6 .col-7 {
                    width: 100%;
                    margin-bottom: 10px;
                }

                .col-md-6 .col-2.text-center {
                    text-align: left !important;
                }

                /* Button adjustments */
                .col-md-3 .d-flex {
                    flex-direction: column;
                    gap: 10px;
                }

                .search-btn {
                    width: 100%;
                }

                .btn-group {
                    display: flex;
                    width: 100%;
                }

                .btn-group .btn {
                    flex: 1;
                }

                /* Adjust map height for mobile */
                .map-container {
                    height: 400px;
                }

                /* Make table more mobile-friendly */
                .production-table {
                    min-width: 650px;
                }

                /* Adjust the table container to scroll horizontally on mobile */
                .production-list-container .table-responsive {
                    overflow-x: auto;
                }

                /* Make sure popups are readable on mobile */
                .map-info-window {
                    min-width: 200px;
                    max-width: 250px;
                    font-size: 14px;
                }

                /* Adjust popup content spacing */
                .map-info-title {
                    font-size: 15px;
                }

                /* Make clusters easier to tap */
                .marker-cluster {
                    transform: scale(1.2);
                }
            }

            /* Improve table on all screen sizes */
            .production-table th {
                position: sticky;
                top: 0;
                background: white;
                z-index: 1;
                box-shadow: 0 1px 0 rgba(0,0,0,0.1);
            }

            /* Improve scrolling behavior within the iframe */
            html {
                scroll-behavior: smooth;
            }

            /* Ensure the results table is not causing horizontal scrolling */
            .table-responsive {
                overflow-x: hidden;
            }

            /* Add a max height to the table to prevent the iframe from becoming too tall */
            .production-list-container .table-responsive {
                max-height: 500px;
                overflow-y: auto;
                border-bottom: 1px solid #dee2e6;
            }

            /* Keep headers visible when scrolling the table */
            .production-table thead th {
                position: sticky;
                top: 0;
                background-color: #f8f9fa;
                z-index: 1;
            }

            .progress-container {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                z-index: 1001;
                background: white;
                padding: 30px;
                border-radius: 8px;
                box-shadow: 0 4px 20px rgba(0,0,0,0.3);
                text-align: center;
                min-width: 300px;
            }

            .progress-text {
                margin-bottom: 15px;
                font-weight: 600;
                color: #333;
            }

            .progress-subtext {
                color: #666;
                font-size: 14px;
                margin-bottom: 20px;
            }

            .progress-bar-container {
                width: 100%;
                height: 6px;
                background-color: #e9ecef;
                border-radius: 3px;
                overflow: hidden;
                margin-bottom: 15px;
            }

            .progress-bar {
                height: 100%;
                background: linear-gradient(90deg, #4CAF50, #45a049);
                border-radius: 3px;
                transition: width 0.3s ease;
                animation: progressPulse 2s ease-in-out infinite;
            }

            @keyframes progressPulse {
                0%, 100% { opacity: 1; }
                50% { opacity: 0.7; }
            }

            /* Spinner improvements */
            .spinner-border-lg {
                width: 3rem;
                height: 3rem;
            }

            .loading-message {
                margin-top: 15px;
                font-weight: 500;
                color: #333;
            }

            .loading-submessage {
                margin-top: 8px;
                font-size: 14px;
                color: #666;
            }

            /* Button loading state animations */
            .btn .spinner-border-sm {
                width: 1rem;
                height: 1rem;
                animation: spin 1s linear infinite;
            }

            @keyframes spin {
                0% { transform: rotate(0deg); }
                100% { transform: rotate(360deg); }
            }

            /* Table loading state */
            .table-loading {
                position: relative;
            }

            .table-loading::after {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(255, 255, 255, 0.8);
                display: flex;
                justify-content: center;
                align-items: center;
                z-index: 10;
            }

            /* Success message styling */
            .success-toast {
                position: fixed;
                top: 20px;
                right: 20px;
                background: #4CAF50;
                color: white;
                padding: 15px 20px;
                border-radius: 6px;
                box-shadow: 0 4px 12px rgba(0,0,0,0.2);
                z-index: 1070;
                animation: slideInRight 0.3s ease-out;
            }

            @keyframes slideInRight {
                from {
                    transform: translateX(100%);
                    opacity: 0;
                }
                to {
                    transform: translateX(0);
                    opacity: 1;
                }
            }

            /* Fade out animation */
            .fade-out {
                animation: fadeOut 0.5s ease-out forwards;
            }

            @keyframes fadeOut {
                from { opacity: 1; }
                to { opacity: 0; }
            }

            /* Advanced Filters Expandable Section */
            .advanced-filters-container {
                overflow: hidden;
                transition: max-height 400ms ease-in-out, opacity 300ms ease-in-out;
                max-height: 0;
                opacity: 0;
                background-color: rgba(248, 249, 250, 0.5);
                border-radius: 8px;
                margin-top: 15px;
            }

            .advanced-filters-container.expanded {
                max-height: 1000px;
                opacity: 1;
            }

            .advanced-filters-content {
                padding: 20px;
                padding-top: 15px;
            }

            /* Toggle button styling */
            #advanced-filters-toggle {
                transition: all 200ms ease-in-out;
                border: 1px solid #0dcaf0;
                color: #0dcaf0;
            }

            #advanced-filters-toggle:hover {
                background-color: #0dcaf0;
                color: white;
            }

            #advanced-filters-icon {
                transition: transform 300ms ease-in-out;
                font-size: 0.9em;
                margin-right: 5px;
            }

            #advanced-filters-icon.rotated {
                transform: rotate(180deg);
            }

            @media (max-width: 768px) {
                .advanced-filters-container.expanded {
                    max-height: 1500px;
                }

                #advanced-filters-text {
                    display: none;
                }
            }
            /* Location input group styling */
            .location-input-group {
                display: flex;
                align-items: center;
                gap: 8px;
                flex-wrap: wrap;
            }

            .location-prefix,
            .location-connector {
                color: #666;
                font-weight: 500;
                white-space: nowrap;
                font-size: 14px;
            }

            .radius-input {
                width: 80px;
                text-align: center;
                flex-shrink: 0;
            }

            .location-input {
                flex: 1;
                min-width: 200px;
            }

            /* Action buttons styling */
            .action-buttons {
                display: flex;
                align-items: center;
                gap: 12px;
                flex-wrap: wrap;
            }

            .search-btn {
                background-color: #4CAF50;
                border-color: #4CAF50;
                font-weight: 600;
            }

            .reset-btn {
                min-width: 80px;
            }

            .more-filters-toggle {
                margin-left: auto;
                color: #0dcaf0;
                text-decoration: none;
                font-size: 14px;
                padding: 6px 12px;
            }

            .more-filters-toggle:hover {
                color: #0aa2c0;
                text-decoration: none;
            }

            /* Advanced filters */
            .advanced-filters-container {
                max-height: 0;
                overflow: hidden;
                transition: max-height 0.3s ease-out;
                background-color: #f8f9fa;
                border-radius: 6px;
                margin-top: 15px;
            }

            .advanced-filters-container.expanded {
                max-height: 800px;
            }

            .advanced-filters-content {
                padding: 20px;
            }

            .advanced-filters-content h6 {
                font-size: 14px;
                margin-bottom: 10px;
                color: #495057;
                font-weight: 600;
            }

            .advanced-filters-content .form-label {
                font-size: 12px;
                margin-bottom: 3px;
            }

            .advanced-filters-content .form-control,
            .advanced-filters-content .form-select {
                height: 36px;
                font-size: 13px;
            }

            #advanced-filters-icon {
                transition: transform 300ms ease-in-out;
            }

            #advanced-filters-icon.rotated {
                transform: rotate(180deg);
            }

            /* Mobile responsive */
            @media (max-width: 768px) {
                .location-input-group {
                    flex-direction: column;
                    align-items: stretch;
                    text-align: center;
                    gap: 10px;
                }

                .location-prefix,
                .location-connector {
                    align-self: center;
                }

                .radius-input {
                    width: 100px;
                    align-self: center;
                }

                .action-buttons {
                    flex-direction: column;
                    align-items: stretch;
                }

                .more-filters-toggle {
                    margin-left: 0;
                    text-align: center;
                }

                .advanced-filters-container.expanded {
                    max-height: 1200px;
                }
            }
