.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   SIDEBAR LAYOUT STYLES
   ============================================ */

/* Main Layout Container */
.main-layout-container {
    display: flex;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Sidebar Filter Styles */
.sidebar-filter {
    width: 280px;
    flex-shrink: 0;
}

/* Main Content Area */
.main-content {
    flex: 1;
    min-width: 0;
}

/* Sidebar Search Container */
.sidebar-search {
    background-color: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0 !important;
}

/* Quick Actions Section */
.sidebar-quick-actions {
    margin-top: 20px;
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quick-actions-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-sidebar-action {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-sidebar-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    filter: brightness(1.1);
}

/* Favorites Toggle in Sidebar */
.favorites-toggle-label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #f0f0f0;
    border-radius: 20px;
    transition: all 0.3s;
    user-select: none;
}

.favorites-toggle-label:hover {
    background: #e0e0e0;
}

.favorites-toggle-label.active {
    /* Only the star changes color, not the button background or border */
}

.favorites-toggle-label.active #favoritesToggleStar {
    color: #ffd700;
}

/* Sidebar Header */
.sidebar-header {
    background: rgb(36, 54, 70);
    color: white;
    padding: 12px 15px;
    text-align: center;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* Sidebar Sections */
.sidebar-sections {
    padding: 15px 10px 0 10px !important;
    margin-bottom: 0 !important;
}

/* Remove default form margins */
#meetSearchForm {
    margin: 0;
    padding: 0;
}

.sidebar-section {
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section.collapsed {
    border: none;
    margin-bottom: 2px;
    background: transparent;
}

.sidebar-section.collapsed .section-header {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.section-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 15px;
    background: #fafafa;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.section-header:hover {
    background: #f0f0f0;
}

.section-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.section-toggle {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s;
    margin-right: 8px;
    flex-shrink: 0;
}

.section-toggle.collapsed {
    /* No rotation needed - arrow text is changed in JavaScript */
}

.section-content {
    padding: 0 15px 15px 15px;
}

.section-content.collapsed {
    display: none;
}

/* Sidebar Input Fields */
.sidebar-input,
.sidebar-select,
.sidebar-date-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

.sidebar-input:focus,
.sidebar-select:focus,
.sidebar-date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.sidebar-field {
    margin-bottom: 12px;
}

.sidebar-field:last-child {
    margin-bottom: 0;
}

.sidebar-label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.sidebar-badges-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}




/* Discipline Tree Structure */
.sidebar-disciplines-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.discipline-tree-item {
    display: flex;
    flex-direction: column;
    margin-top: 1px;
    margin-bottom: 1px;
}

.discipline-tree-item.level-0 {
    margin-left: 0;
}

.discipline-tree-item.level-1 {
    margin-left: 10px;
}

.discipline-tree-item.level-2 {
    margin-left: 20px;
}

.discipline-tree-item.level-3 {
    margin-left: 30px;
}

.discipline-row {
    display: flex;
    align-items: center;
    margin-bottom: 1px;
}

.sidebar-discipline {
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 20px;
    border: 2px solid #ddd;
    background: #f8f8f8;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 4px;
}

.sidebar-discipline:hover {
    border-color: #2196F3;
    background: #e3f2fd;
}

.sidebar-discipline.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.sidebar-discipline.selected:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Expand/Collapse Toggle for Disciplines */
.discipline-expand-toggle {
    width: 16px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 10px;
    transition: transform 0.3s;
    user-select: none;
    flex-shrink: 0;
}

.discipline-expand-toggle:hover {
    color: #333;
}

.discipline-expand-toggle.expanded {
    /* No rotation needed - arrow text is changed in JavaScript */
}

/* Placeholder for disciplines without children */
.discipline-no-toggle {
    width: 16px;
    height: 20px;
    display: inline-block;
    flex-shrink: 0;
}

/* Subdisciplines Container */
.subdisciplines-container {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.subdisciplines-container.expanding {
    max-height: 1000px;
}

.subdisciplines-container.collapsing {
    max-height: 0;
}

/* All discipline levels use the same styling - only indentation differs */

/* Radius Search Group */
.sidebar-radius-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-zip-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.radius-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-radius-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.radius-label {
    font-size: 12px;
    color: #666;
}

/* New inline radius search styles */
.sidebar-radius-group-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-zip-input-small {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}

.sidebar-radius-input-small {
    width: 45px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}

.radius-label-small {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

/* Inline date fields */
.sidebar-dates-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-date-input-small {
    width: 105px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
}

.sidebar-date-input-small:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.date-separator {
    font-size: 12px;
    color: #666;
}

/* My Subscriptions Button */
.btn-my-subscriptions {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-my-subscriptions:hover {
    background-color: #1976D2;
}

/* Subscribe Button */
.btn-subscribe {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    display: inline-flex;
    align-items: center;
}

.btn-subscribe:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    transform: translateY(-1px);
}

.btn-subscribe:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

/* Favorites Button */
.btn-favorites {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: black;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 60px);
    margin: 0 auto;
}

.btn-favorites:hover {
    background: linear-gradient(135deg, #ffb700 0%, #ff9500 100%);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
}

.btn-favorites:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}

.btn-favorites.active {
    background: linear-gradient(135deg, #ffb700 0%, #ff9500 100%);
}

.btn-favorites.active #favoritesToggleStar {
    /* Star stays the same color as it's already white on the gold background */
}

/* Favorite Star Styling */
.favorite-star {
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
    user-select: none;
}

.favorite-star:hover {
    transform: scale(1.2);
}

.favorite-star[data-favorite="1"] {
    color: #ffd700;
}

.favorite-star[data-favorite="0"] {
    color: #95a5a6;
}

.favorite-star[data-favorite="0"]:hover {
    color: #bdc3c7;
}

/* Favorites Column in Table */
.meet-table th:first-child,
.meet-table td:first-child {
    width: 40px;
    text-align: center;
    padding: 10px 8px;
}

/* Meet Table Styles */
.meet-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.meet-table table td {
    border: none;
    padding: 0;
}

/* Favorites Toggle Badge */
.favorites-toggle-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 20px;
    background-color: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Image Upload Styles */
.thumbnail {
    transition: all 0.3s ease;
}

.thumbnail.dragover {
    background-color: #e9ecef !important;
    border-color: #6c757d !important;
}

/* Meet Image Display Styles */
.meet-table img {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.meet-table img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Image Upload Button Styles */
button[onclick*="meetImageFile"]:hover {
    background-color: #46b8da !important;
    border-color: #31b0d5 !important;
}

#removeImageBtn:hover {
    background-color: #d0d0d0 !important;
    border-color: #c0c0c0 !important;
}

.favorites-toggle-badge:hover {
    background-color: #e8e8e8;
    border-color: #ccc;
}

.favorites-toggle-badge.active {
    background-color: #e3f2fd;
    border-color: #2196F3;
    color: #000;
}

.favorites-toggle-badge.active:hover {
    background-color: #bbdefb;
    border-color: #1976D2;
}

/* Sort By Distance Button */
.btn-sort-distance {
    transition: all 0.3s ease;
}

.btn-sort-distance:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Close button styling for submit meet form */
.submit-meet-dropdown-container .close {
    color: #666;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 20px;
}

.submit-meet-dropdown-container .close:hover,
.submit-meet-dropdown-container .close:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.meet-search {
    background-color: #f5f5f5;
    padding: 5px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
    font-size: 14px;
}

.search-header-bar {
    background-color: #e0e0e0;
    margin: -5px -5px 12px -5px;
    padding: 10px 15px;
    border-radius: 10px 10px 0 0;
}

.search-header {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.search-columns {
    display: grid;
    grid-template-columns: minmax(200px, auto) minmax(360px, auto) repeat(1, auto);
    gap: 10px;
    justify-content: center;
}

/* When 4 columns are present (logged in users) */
.search-columns:has(.search-column:nth-child(4)) {
    grid-template-columns: minmax(200px, auto) minmax(360px, auto) repeat(2, auto);
}

.search-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 0 10px;
    position: relative;
}

.search-column:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #e0e0e0;
}

.column-title {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.column-section {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
}

.field-label {
    display: block;
    font-size: 11px;
    color: #666;
    margin-bottom: 3px;
    font-weight: 500;
}

.search-input {
    width: 220px;
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    text-align: center;
}





.radius-group {
    display: flex;
    gap: 8px;
    align-items: center;
}


.filter-select {
    width: 160px;
    padding: 6px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
}

.date-input {
    width: 130px;
    padding: 6px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
}

.zip-input {
    width: 60px;
    padding: 6px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    text-align: center;
}

.radius-input {
    width: 45px;
    padding: 6px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
}

.radius-label {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
    margin-top: 35px;
    text-align: center;
}

.search-button {
    background-color: #28a745;
    color: white;
    padding: 10px 30px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #218838;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
    background-color: #f5f5f5;
    border-radius: 10px;
}

.meet-results h2 {
    margin-bottom: 20px;
    color: #333;
}

.meet-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.meet-item {
    background-color: #fff;
    border: 3px solid #1976D2;
    border-radius: 10px;
    padding: 20px;
    transition: box-shadow 0.3s;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.1);
}

.meet-item:hover {
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

.meet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.meet-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.meet-org {
    background-color: #007bff;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.meet-details p {
    margin: 5px 0;
    color: #666;
}

.meet-location {
    font-size: 16px;
}

.meet-date {
    font-size: 14px;
    font-weight: bold;
    color: #28a745;
}

.meet-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 20px;
    background-color: #17a2b8;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.meet-link:hover {
    background-color: #138496;
}

.submit-meet-dropdown-container {
    max-width: 900px;
    margin: auto;
    padding: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    background-color: #f9f9f9;
    font-family: Arial, sans-serif;
    display: block;
    position: relative;
    margin-bottom: 40px;
}

.form-section {
    background-color: #ffffff;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.section-header {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.form-section-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.section-label {
    flex: 0 0 130px;
    padding-right: 20px;
    padding-top: 5px;
}

.section-header-left {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    text-align: right;
}

.section-fields {
    flex: 1;
    padding-left: 15px;
    border-left: 2px solid #e8e8e8;
}

.form-control {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    font-size: 14px;
    width: 100%;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background-color: rgba(255, 255, 255, 1);
    outline: none;
}

.form-control:hover {
    border-color: rgba(52, 152, 219, 0.3);
    background-color: rgba(255, 255, 255, 0.95);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
    font-size: 13px;
}

.section-fields .form-row {
    display: block;
    margin-bottom: 10px;
}

.section-fields .form-row .form-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0;
}

.section-fields .form-row label {
    flex: 0 0 140px;
    text-align: right;
    padding-right: 15px;
    margin-bottom: 0;
    padding-top: 8px;
}

.section-fields .form-row .form-control {
    width: 400px;
    max-width: 100%;
}

.section-fields .form-row select.form-control {
    width: 300px;
}

.section-fields .form-row input[type="date"].form-control {
    width: 200px;
}

#newMeetForm {
    padding: 0 10px;
}


/* Discipline Badge Styles */
.discipline-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid #ddd;
    background-color: #f8f9fa;
    color: #666;
}

.discipline-badge:hover {
    background-color: #e9ecef;
    border-color: #999;
}

/* Removed old discipline-badge.selected styles - now using sidebar-discipline styles */

/* Discipline Option Styles (for form) */
.discipline-option {
    display: inline-block;
    padding: 5px 10px;
    margin: 2px;
    border: 2px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    background-color: #fff;
}

.discipline-option:hover {
    background-color: #f8f9fa;
    border-color: #999;
}

.discipline-option.selected {
    background-color: #e3f2fd;
    border-color: #90caf9;
    color: #1565c0;
}

/* Expand Discipline Button */
.btn-expand-discipline {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 4px;
    font-size: 10px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-expand-discipline:hover {
    background: #e0e0e0;
    border-color: #999;
}

/* Show More Button */
.btn-show-more {
    padding: 2px 8px;
    margin-left: 5px;
    font-size: 11px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-show-more:hover {
    background: #e0e0e0;
    border-color: #999;
}

/* Discipline Tree Container */
#disciplineTreeContainer,
#searchDisciplineTree {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
}

#searchDisciplineTree {
    max-height: 300px;
    overflow-y: auto;
}

/* Discipline Tree Content */
#disciplineTreeContent,
#searchDisciplineContent {
    margin-top: 10px;
}

/* Discipline Tree Checkboxes */
#disciplineTreeContent input[type="checkbox"],
#searchDisciplineContent input[type="checkbox"] {
    margin-right: 8px;
}

/* Discipline Badges Container */
.discipline-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

/* Discipline List - simple layout with two rows */
.discipline-list {
    text-align: center;
}

/* First row - 2 wide badges */
.discipline-row-first {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-bottom: 6px;
}

.discipline-badge-wide {
    display: inline-block;
    width: 163px;
    text-align: center;
    padding: 4px 8px;
}

/* Second row - 5 narrow badges */
.discipline-row-second {
    display: flex;
    justify-content: center;
    gap: 1px;
}

.discipline-badge-narrow {
    display: inline-block;
    width: 65px;
    text-align: center;
    padding: 4px 2px;
}

.discipline-top-level {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* New disciplines two-column layout */
.disciplines-container {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    min-height: 200px;
}

.disciplines-left {
    flex: 0 0 300px;
    border-right: 1px solid #ddd;
    padding-right: 20px;
}

.discipline-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    padding: 4px 0;
}

.discipline-form-row .discipline-option {
    flex: 1;
    padding: 5px 10px;
    border: 2px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    margin-right: 10px;
}

.discipline-form-row .discipline-option:hover {
    background-color: #f5f5f5;
    border-color: #2196F3;
}

.discipline-form-row .discipline-option.selected {
    background-color: #2196F3;
    color: white;
    border-color: #2196F3;
}

.btn-show-levels {
    padding: 4px 12px;
    font-size: 12px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-show-levels:hover {
    background: #e0e0e0;
    border-color: #999;
}

.btn-show-levels.active {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
}

.disciplines-right {
    flex: 1;
    padding-left: 20px;
    position: relative;
}

.subdisciplines-placeholder {
    color: #999;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

.subdisciplines-container {
    padding: 10px;
}

.subdiscipline-item {
    display: inline-block;
    padding: 1px 10px;
    margin: 1px;
    border: 2px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    background: #f9f9f9;
}

.subdiscipline-item:hover {
    background: #f0f0f0;
    border-color: #999;
}

/* Middle-level disciplines don't have selected state - always grey */
.subdiscipline-item:not(.leaf-item) {
    /* Always use base styling, no selected state */
}

/* Only leaf items can be selected */
.subdiscipline-item.leaf-item.selected {
    background: #c8e6c9;
    border-color: #388E3C;
}

/* Table structure for hierarchical discipline display */
.subdisciplines-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
    border: 1px solid #000;
}

.subdisciplines-table td {
    padding: 2px;
    border: 1px solid #000;
    vertical-align: middle;
}

/* Different levels get different background colors for visual hierarchy */
/* These will be overridden by inline styles for dynamic gradient */
.subdisciplines-table td.level-2 {
    background-color: #000;  /* Black for first column */
    text-align: center;
    color: #fff;  /* White text on black background */
}

.subdisciplines-table td.level-3 {
    background-color: #808080;  /* Middle grey */
    text-align: center;
}

.subdisciplines-table td.level-4 {
    background-color: #c0c0c0;  /* Light grey */
    text-align: center;
}

/* Spacer cells for alignment */
.subdisciplines-table td.spacer-cell {
    background: #d0d0d0;
    min-width: 50px;
    text-align: center;
}

/* Leaf group cells have special styling */
.subdisciplines-table td.leaf-group-cell {
    background-color: #fff;  /* Plain white for leaf cells */
    padding: 2px;
}

/* Leaf items within the group */
.subdiscipline-item.leaf-item {
    margin: 1px;
    background: #fff;
    border-color: #ddd;
}

/* Only apply hover to unselected leaf items */
.subdiscipline-item.leaf-item:not(.selected):hover {
    background: #f5f5f5;
    border-color: #999;
}

@media (max-width: 768px) {
    /* Transform sidebar layout to vertical stack on mobile */
    .main-layout-container {
        flex-direction: column;
        padding: 10px;
    }
    
    .sidebar-filter {
        width: 100%;
        position: static;
        max-height: none;
        margin-bottom: 20px;
    }
    
    /* Make sidebar collapsible on mobile */
    .sidebar-search {
        position: relative;
    }
    
    .sidebar-header {
        cursor: pointer;
    }
    
    .sidebar-sections {
        max-height: 60vh;
        overflow-y: auto;
    }
    
    /* Old search styles for backward compatibility */
    .search-columns {
        grid-template-columns: 1fr;
        gap: 15px;
        width: 100%;
    }
    
    .search-column {
        width: 100%;
    }
    
    .search-input,
    .filter-select,
    .date-input {
        width: 100%;
    }
    
    .radius-group {
        flex-wrap: wrap;
    }
    
    .zip-input {
        width: 100px;
    }
    
    .form-section-row {
        flex-direction: column;
    }
    
    .section-label {
        flex: 0 0 auto;
        padding-right: 0;
        padding-bottom: 10px;
        text-align: left;
    }
    
    .section-header-left {
        text-align: left;
    }
    
    .section-fields {
        padding-left: 0;
        padding-top: 10px;
        border-left: none;
        border-top: 2px solid #e8e8e8;
    }
    
    .section-fields .form-row {
        flex-direction: column;
    }
    
    .section-fields .form-row label {
        flex: 0 0 auto;
        text-align: left;
        padding-right: 0;
        padding-bottom: 5px;
    }
    
    .section-fields .form-row .form-control {
        width: 100%;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 50px auto;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    border-radius: 10px 10px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-body {
    padding: 20px;
}

/* Report Problem Button */
.report-problem-btn {
    transition: background-color 0.3s, transform 0.1s;
}

.report-problem-btn:hover {
    background-color: #ff5252 !important;
    transform: scale(1.05);
}

/* Form Styles in Modal */
#reportProblemForm .form-group {
    margin-bottom: 20px;
}

#reportProblemForm label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 600;
}

#reportProblemForm .form-control {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.3s;
}

#reportProblemForm .form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#reportProblemForm textarea {
    resize: vertical;
    min-height: 80px;
}

#reportProblemForm .char-count {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

#reportProblemForm small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
}

.form-actions {
    margin-top: 20px;
    text-align: center;
}

.btn {
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 0 5px;
}

.btn-primary {
    background-color: #28a745;
    color: white;
}

.btn-primary:hover {
    background-color: #218838;
}

.btn-primary:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Alert styles in modal */
#reportMessages .alert {
    margin-top: 15px;
}

#reportMessages .alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

#reportMessages .alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* General Report Modal Styles */
#generalReportModal .form-control {
    margin-bottom: 0;
}

#generalReportModal .alert {
    margin-top: 15px;
}

#generalReportMessages .alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

#generalReportMessages .alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

#generalCharCount {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.report-problem-floating:hover {
    background-color: #ff5252 !important;
}

/* Subscription Info Section */
.subscription-info-section {
    background-color: #e3f2fd;
    border-top: 1px solid #bbdefb;
    padding: 12px 20px;
    margin: 0 -5px -5px -5px;
    border-radius: 0 0 10px 10px;
    font-size: 13px;
    color: #1565C0;
    text-align: center;
    line-height: 1.4;
}

/* Subscription Prompt Styles */
.subscription-prompt {
    position: absolute;
    left: 0;
    bottom: calc(100% + 5px);
    background: linear-gradient(135deg, #e3f2fd 0%, #f3f9ff 100%);
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    animation: slideIn 0.4s ease-out;
    white-space: nowrap;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.subscription-prompt-content {
    display: flex;
    align-items: center;
    color: #1565C0;
    font-size: 14px;
    font-weight: 500;
}

