/* SearchResults.aspx specific styles */

/* iframe styling */
iframe {
    overflow-x: hidden;
    overflow-y: hidden;
}

/* Fix RadComboBox contrast issue - override white-on-white */
.rcbInput {
    color: #333333 !important;
    background-color: #ffffff !important;
}

.RadComboBox .rcbInputCell .rcbInput {
    color: #333333 !important;
}

/* Ensure proper focus and hover states */
.RadComboBox .rcbHovered .rcbInput {
    color: #000000 !important;
    background-color: #f5f5f5 !important;
}

.RadComboBox .rcbFocused .rcbInput {
    color: #000000 !important;
    background-color: #ffffff !important;
}

.non-link-text {
    text-decoration: none !important;
}

/* Force specific width for Tax Year dropdown */
#ctl00_MainContent_cmboLevyYear {
    width: 250px !important;
}

#ctl00_MainContent_cmboLevyYear table {
    padding-left:10px;
    width: 250px !important;
}

#ctl00_MainContent_cmboLevyYear .rcbInputCell {
    width: calc(250px - 17px) !important; /* Subtract arrow cell width */
}

/* Two-column layout wrapper for map and details */
.content-wrapper {
    display: flex !important;
    gap: 20px !important;
    margin-top: 20px !important;
    align-items: flex-start !important;
}

/* Map Column */
.map-column {
    flex: 0 0 350px !important;
    min-width: 350px !important;
}

/* Details Column */
.details-column {
    flex: 1 !important;
    min-width: 0 !important;
}

/* Map Section Styling */
.map-section {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    text-align: center;
}

.map-iframe {
    overflow-x: hidden;
    overflow-y: hidden;
    border: 1px solid #ccc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.map-notice {
    margin-top: 10px;
    text-align: center;
    font-style: italic;
}

/* Details Section - FORCE VERTICAL LAYOUT */
.details-section {
    width: 100%;
    display: block !important; /* Override any flex */
}

.details-container {
    width: 100%;
    display: block !important; /* Override any flex */
    flex-direction: column !important; /* If flex is forced, make it vertical */
}

/* TabStrip and MultiPage - FORCE VERTICAL STACKING */
.RadTabStrip {
    display: block !important;
    width: 100% !important;
    margin-bottom: 0 !important;
    position: relative;
    z-index: 100;
}

.RadMultiPage {
    display: block !important;
    width: 100% !important;
    margin-top: 0 !important;
    position: relative;
    z-index: 99;
    clear: both;
}

/* Update existing page-view class */
.page-view {
    border: 1px solid Navy;
    width: 100%;
    max-width: none;
    display: block !important;
}

/* Detail Grid System */
.detail-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.detail-row {
    display: flex;
    min-height: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.detail-row.bold-header {
    font-weight: bold;
    background-color: #f5f5f5;
}

.detail-row.learn-more {
    padding: 8px;
    text-align: center;
}

.detail-label {
    flex: 1;
    padding: 4px 8px;
    border-right: 1px solid #e0e0e0;
    background-color: #f9f9f9;
}

.detail-value {
    flex: 1;
    padding: 4px 8px;
    background-color: #fff;
}

/* Repeater Row Styling */
.repeater-row.alt-row-a {
    background-color: #f8f8f8;
}

.repeater-row.alt-row-b {
    background-color: #ffffff;
}

.repeater-row .detail-label {
    background-color: inherit;
}

.repeater-row .detail-value {
    background-color: inherit;
}

/* Map container inner styling */
.map-inner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Search Section - Improved Alignment */
.search-section {
    float: left;
    max-width: 440px;
    width: 440px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.search-field {
    margin-bottom: 8px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Force consistent width for all search controls */
.search-field .RadComboBox,
.search-field .RadTextBox {
    width: 416px !important;
}

.search-field .RadComboBox .rcbInputCell,
.search-field .RadTextBox .riTextBox {
    width: 100% !important;
}

/* Override for Tax Year dropdown specifically */
.search-field .RadComboBox#ctl00_MainContent_cmboLevyYear {
    width: 416px !important;
}

/* Search hints alignment */
.search-hint {
    width: 416px;
    text-align: right;
    margin-bottom: 8px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10pt;
}

.search-separator {
    width: 416px;
    text-align: center;
    margin: 8px 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9pt;
}

.search-button-container {
    width: 416px;
    margin-bottom: 10px;
    text-align: left;
}

.search-warning {
    width: 416px;
    margin-bottom: 10px;
    text-align: left;
}

.search-results {
    width: 416px;
    margin-bottom: 10px;
    text-align: left;
}

/* Search Results Grid */
.search-results-grid {
    margin-left: 460px; /* Adjusted for the wider search section */
}

/* Remove blue border from RadGrid */
.RadGrid {
    border-top: none !important;
    border: none !important;
}

.RadGrid .rgMasterTable {
    border-top: none !important;
    border: none !important;
}

.RadGrid_Web20 {
    border-top: none !important;
    border: none !important;
}

#ctl00_MainContent_dgSearchResults {
    border-top: none !important;
    border: none !important;
}

.RadAjaxPanel {
    border-top: none !important;
    border: none !important;
}

/* Remove padding from RadComboBox input cell */
.RadComboBox table td.rcbInputCell {
    padding: 1px 1px 1px 2px !important;
}

/* Utility Classes */
.clearfix {
    clear: both;
}

/* Responsive Design - Only stack on very small screens */
@media (max-width: 768px) {
    .search-section {
        float: none;
        max-width: 100%;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .search-field .RadComboBox,
    .search-field .RadTextBox {
        width: 100% !important;
    }
    
    #ctl00_MainContent_cmboLevyYear {
        width: 250px !important;
    }
    
    .search-hint,
    .search-separator,
    .search-button-container,
    .search-warning,
    .search-results {
        width: 100%;
    }
    
    .search-results-grid {
        margin-left: 0;
    }
    
    .content-wrapper {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .map-column {
        flex: none !important;
        width: 100% !important;
        min-width: auto !important;
    }
    
    .map-section {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .details-column {
        width: 100% !important;
        min-width: auto !important;
    }
    
    .map-iframe {
        width: 100%;
        max-width: 320px;
        height: 300px;
    }
    
    .page-view {
        width: 100%;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
}

/* For medium screens, adjust the map column width but keep side-by-side */
@media (max-width: 1200px) and (min-width: 769px) {
    .map-column {
        flex: 0 0 300px !important;
        min-width: 300px !important;
    }
    
    .map-iframe {
        width: 280px;
        height: 350px;
    }
    
    .search-section {
        max-width: 400px;
        width: 400px;
    }
    
    .search-field .RadComboBox,
    .search-field .RadTextBox {
        width: 380px !important;
    }
    
    #ctl00_MainContent_cmboLevyYear {
        width: 416px !important;
    }
    
    .search-hint,
    .search-separator,
    .search-button-container,
    .search-warning,
    .search-results {
        width: 380px;
    }
    
    .search-results-grid {
        margin-left: 420px;
    }
}