body { font-family: Arial, sans-serif; max-width: 1200px; margin: 0 auto; padding: 20px; background: #f5f5f5; }
.header { background: #2c3e50; color: white; padding: 20px; border-radius: 8px; margin-bottom: 20px; text-align: center; }
.container { background: #f5f5f5; padding: 20px; border-radius: 8px; margin-bottom: 20px; }

/* Add padding to tab content to prevent overlap with sticky bar */
.tab-content {
    padding-bottom: 100px; /* Space for sticky action bar */
}
.state-section { margin-bottom: 30px; }
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin: 15px 0; }
.city-checkbox { display: flex; align-items: center; padding: 8px; background: white; border-radius: 4px; border: 1px solid #ddd; }
.city-checkbox:hover { background: #f8f9fa; }
.city-checkbox input { margin-right: 8px; }
.results { background: white; padding: 20px; border-radius: 8px; margin-top: 20px; }
.city-result { border-left: 4px solid #007cba; padding: 15px; margin: 10px 0; background: #f9f9f9; }
.homepage-matches { background: #fff3cd; padding: 10px; margin: 5px 0; border-radius: 4px; }
.agenda-item { background: #d4edda; padding: 10px; margin: 5px 0; border-radius: 4px; border-left: 3px solid #28a745; }
.pdf-item { border-left-color: #dc3545; }
.cannabis-update { margin: 15px 0; padding: 15px; background: #fff; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.update-recent { border-left: 4px solid #4CAF50; }
.update-upcoming { border-left: 4px solid #FF9800; }
.update-date { font-weight: bold; color: #333; font-size: 1.1em; margin-bottom: 5px; }
.update-type { color: #666; font-size: 0.9em; margin-bottom: 8px; }
.update-content { margin: 10px 0; line-height: 1.5; }
.update-link a { color: #1976D2; text-decoration: none; font-weight: 500; }
.update-link a:hover { text-decoration: underline; }
.section-header { font-size: 1.2em; font-weight: bold; margin: 25px 0 15px 0; color: #2c3e50; }
.progress { 
    width: 100%; 
    background: #f0f0f0; 
    border-radius: 4px; 
    margin: 10px 0;
    height: 20px;
    overflow: hidden;
    border: 1px solid #ddd;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}
.progress-bar { 
    height: 20px; 
    background: #007cba;
    border-radius: 4px; 
    text-align: center; 
    color: white; 
    line-height: 20px;
    font-weight: bold;
    font-size: 12px;
    transition: width 0.3s ease;
}
button { background: #007cba; color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; margin: 5px; }
button:hover { background: #005a87; }
button:disabled { background: #ccc; cursor: not-allowed; }
.secondary-btn { background: #6c757d; }
.secondary-btn:hover { background: #5a6268; }
.success-btn { background: #28a745; }
.success-btn:hover { background: #218838; }
.warning-btn { background: #ffc107; color: #212529; }
.warning-btn:hover { background: #e0a800; }
.info-btn { background: #17a2b8; color: white; }
.info-btn:hover { background: #138496; }
.danger-btn { background: #dc3545; color: white; }
.danger-btn:hover { background: #c82333; }
.error { color: red; background: #f8d7da; padding: 10px; border-radius: 4px; margin: 5px 0; }
.success { color: green; background: #d4edda; padding: 10px; border-radius: 4px; margin: 5px 0; }
.status { padding: 10px; border-radius: 4px; margin: 20px 0; }
.status.running { background: #fff3cd; }
.status.complete { background: #d4edda; }

/* Ensure scan status and results are visible above sticky bar */
#scanStatus, #progressContainer, #scanResults {
    margin-top: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 50; /* Above content but below sticky bar */
}
/* Sticky action bar */
.selection-controls { 
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px 20px;
    box-shadow: 0 -3px 12px rgba(0,0,0,0.15), inset 0 1px 0 rgba(0,0,0,0.05);
    z-index: 100;
    border-top: 3px solid #007cba;
    border-bottom: 1px solid #ddd;
    margin: 0 -20px -20px -20px; /* Compensate for container padding */
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98);
    width: 100%;
}

.selection-controls button {
    margin: 0; /* Override default margin */
    white-space: nowrap; /* Prevent text wrapping */
    min-width: 110px; /* Minimum width for all buttons */
    height: 38px; /* Consistent height */
    padding: 0 16px; /* Horizontal padding only */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px; /* Consistent font size */
    font-weight: 600; /* Slightly bolder */
    border-radius: 5px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.selection-controls button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.selection-controls button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.selection-controls button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#scanButton {
    width: auto !important; /* Auto width based on content */
    min-width: 130px !important; /* Min width for button text */
    height: 38px !important; /* Match other buttons */
    padding: 0 20px !important; /* Horizontal padding */
    flex-shrink: 0; /* Prevent shrinking */
    font-size: 14px !important;
}

/* Status spinner */
.status-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: #007cba;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .selection-controls {
        padding: 10px 15px;
    }
    
    .selection-controls button {
        font-size: 0.9em;
        padding: 8px 15px;
    }
    
    #selectedCount {
        width: 100%;
        text-align: center;
        margin: 5px 0 !important;
    }
    
    .tab-content {
        padding-bottom: 120px; /* More space on mobile for multi-line buttons */
    }
}

/* State section with accordion */
.state-header { 
    display: flex; 
    align-items: center; 
    margin-bottom: 10px;
    cursor: pointer;
    user-select: none;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: background 0.2s;
}
.state-header:hover {
    background: #e9ecef;
}
.state-header h3 { 
    margin: 0; 
    flex: 1;
}
.state-toggle {
    font-size: 1.3em;
    color: #666;
    margin-right: 12px;
    transition: transform 0.3s ease;
    line-height: 1;
    cursor: pointer;
}
.state-toggle.collapsed {
    transform: rotate(-90deg);
}

/* Collapsible city grid */
.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    margin: 15px 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: scaleY(1);
    transform-origin: top;
}
.city-grid.collapsed {
    opacity: 0;
    transform: scaleY(0);
    margin: 0;
    padding: 0;
    height: 0;
}
.county-filter { margin: 10px 0; }
.county-filter select { padding: 5px; border-radius: 4px; border: 1px solid #ddd; }
.match-preview { font-size: 0.9em; color: #666; margin-top: 5px; }
.stats { background: #e3f2fd; padding: 10px; border-radius: 4px; margin: 10px 0; }
.tabs { display: flex; margin-bottom: 20px; border-bottom: 2px solid #ddd; }
.tab { padding: 10px 20px; cursor: pointer; border-bottom: 2px solid transparent; }
.tab.active { border-bottom-color: #007cba; background: #f8f9fa; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.form-group { margin: 15px 0; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.form-group input, .form-group select, .form-group textarea { 
    width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; 
}
.form-group select {
    background: white url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23333" stroke-width="2"><polyline points="6,9 12,15 18,9"/></svg>') no-repeat right 12px center;
    background-size: 14px;
    padding: 10px 35px 10px 12px;
    border: 2px solid #007cba;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    transition: all 0.2s;
}
.form-group select:hover {
    border-color: #005a87;
    box-shadow: 0 2px 4px rgba(0, 123, 186, 0.2);
}
.form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 123, 186, 0.1);
}
.form-group input[type="file"] { padding: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.upload-area { 
    border: 2px dashed #007cba; border-radius: 8px; padding: 40px; text-align: center; 
    background: #f8f9fa; cursor: pointer; transition: all 0.3s;
}
.upload-area:hover { background: #e9ecef; border-color: #005a87; }
.upload-area.dragover { background: #e3f2fd; border-color: #1976d2; }
.json-preview { background: #f8f9fa; padding: 15px; border-radius: 4px; max-height: 200px; overflow-y: auto; font-family: monospace; font-size: 0.9em; }
.city-list-item { display: flex; justify-content: space-between; align-items: center; padding: 8px; background: white; border-radius: 4px; margin: 5px 0; border: 1px solid #ddd; }
.city-list-item:hover { background: #f8f9fa; }
.remove-btn { background: #dc3545; color: white; border: none; padding: 4px 8px; border-radius: 3px; cursor: pointer; font-size: 0.8em; }
.remove-btn:hover { background: #c82333; }
.vote-buttons { display: flex; gap: 5px; }
.vote-btn { background: #f8f9fa; border: 1px solid #ddd; padding: 2px 6px; border-radius: 3px; cursor: pointer; font-size: 0.8em; min-width: 35px; }
.vote-btn:hover { background: #e9ecef; }
.vote-btn.upvote:hover { background: #d4edda; border-color: #28a745; }
.vote-btn.downvote:hover { background: #f8d7da; border-color: #dc3545; }
.keyword-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 15px 0; }
.keyword-item { display: flex; align-items: center; justify-content: space-between; padding: 8px; background: white; border-radius: 4px; border: 1px solid #ddd; }
.keyword-item:hover { background: #f8f9fa; }
.keyword-text { flex-grow: 1; margin-right: 10px; }
.keyword-category { background: #e3f2fd; padding: 15px; border-radius: 8px; margin: 15px 0; }
.keyword-category h4 { margin: 0 0 10px 0; color: #1976d2; }
.add-keyword-form { background: #f8f9fa; padding: 15px; border-radius: 8px; margin: 15px 0; }
.keyword-stats { background: #e8f5e8; padding: 10px; border-radius: 4px; margin: 10px 0; }
.preset-keywords { background: #fff3e0; padding: 15px; border-radius: 8px; margin: 15px 0; }
.preset-btn { background: #ff9800; color: white; padding: 5px 10px; margin: 2px; border: none; border-radius: 3px; cursor: pointer; font-size: 0.8em; }
.preset-btn:hover { background: #f57c00; }
.ai-analysis { background: #d1ecf1; padding: 12px; border-radius: 6px; margin: 10px 0; border-left: 4px solid #17a2b8; }
.confidence-badge { display: inline-block; padding: 4px 8px; border-radius: 12px; font-size: 0.8em; font-weight: bold; }
.high-confidence { background: #d4edda; color: #155724; }
.medium-confidence { background: #fff3cd; color: #856404; }
.low-confidence { background: #f8d7da; color: #721c24; }

