* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    margin-bottom: 20px;
    color: #222;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.controls-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input {
    width: 100%;
    padding: 10px 35px 10px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    width: 20px;
    height: 20px;
    padding: 0;
    font-size: 18px;
    line-height: 18px;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
}

.search-clear:hover {
    color: #333;
}

.search-input:disabled {
    background: #f5f5f5;
    color: #999;
}

.proximity-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.zip-input {
    width: 80px;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.zip-input:focus {
    outline: none;
    border-color: #007bff;
}

.radius-select {
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.radius-select:focus {
    outline: none;
    border-color: #007bff;
}

.proximity-clear {
    display: none;
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 18px;
    line-height: 26px;
    color: #999;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.proximity-clear:hover {
    color: #333;
    border-color: #999;
}

.error-message {
    background: #fef2f2;
    color: #991b1b;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #fecaca;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    white-space: nowrap;
}

.date-filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.date-input {
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.date-input:focus {
    outline: none;
    border-color: #007bff;
}

.date-clear {
    display: none;
    padding: 4px 8px;
    font-size: 16px;
    line-height: 1;
    color: #999;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.date-clear:hover {
    color: #333;
    border-color: #999;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 0 10px;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.highlight-days-label {
    color: #666;
    font-size: 14px;
    margin-left: 5px;
}

.highlight-days-select {
    padding: 4px 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.highlight-days-select:focus {
    outline: none;
    border-color: #007bff;
}

.btn {
    padding: 10px 20px;
    font-size: 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn:hover {
    background: #0056b3;
}

.event-count {
    color: #666;
    margin-bottom: 15px;
}

.events-table {
    width: 100%;
    border-collapse: collapse;
}

.events-table th,
.events-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.events-table th {
    background: #f8f9fa;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.events-table th:hover {
    background: #e9ecef;
}

.sort-icon {
    color: #999;
    font-size: 12px;
    margin-left: 5px;
}

.events-table tbody tr:hover {
    background: #f8f9fa;
}

.events-table a {
    color: #007bff;
    text-decoration: none;
}

.events-table a:hover {
    text-decoration: underline;
}

.past-event {
    opacity: 0.6;
}

.badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
}

.badge-new {
    background: #dcfce7;
    color: #166534;
}

.badge-updated {
    background: #dbeafe;
    color: #1e40af;
}

.no-events {
    text-align: center;
    color: #666;
    padding: 40px;
}

.filter-hint {
    font-size: 14px;
    color: #888;
    margin-top: 8px;
    display: inline-block;
}

.filter-hint .badge {
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .date-filter-group {
        flex-wrap: wrap;
        width: 100%;
    }

    .date-label {
        flex: 1;
        min-width: 140px;
    }

    .date-input {
        flex: 1;
    }

    .events-table {
        font-size: 14px;
    }

    .events-table th,
    .events-table td {
        padding: 8px;
    }
}
