/* Jefferson Historical Database Styles */

.jhs-database-wrapper {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
}

/* Navigation */
.jhs-navigation {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    line-height: 1.8;
}

.jhs-navigation strong {
    font-size: 16px;
    display: block;
    margin-bottom: 10px;
}

.jhs-navigation a {
    color: #0066cc;
    text-decoration: none;
    padding: 2px 4px;
}

.jhs-navigation a:hover {
    text-decoration: underline;
    background: #e6f2ff;
}

.jhs-alpha-nav,
.jhs-year-nav {
    margin-top: 15px;
    line-height: 2;
}

.jhs-month-nav {
    margin: 15px 0;
    padding: 10px;
    background: #f9f9f9;
    line-height: 1.8;
}

/* Search Form */
.jhs-search-form {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.jhs-search-form-inner {
    margin: 0;
}

.jhs-search-input {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
    border-radius: 3px;
}

.jhs-search-button {
    padding: 8px 20px;
    font-size: 14px;
    background: #0066cc;
    color: white;
    border: none;
    cursor: pointer;
    margin-bottom: 10px;
    margin-right: 10px;
    border-radius: 3px;
}

.jhs-search-button:hover {
    background: #0052a3;
}

.jhs-search-help {
    margin-top: 10px;
    margin-bottom: 5px;
    color: #666;
    font-size: 12px;
}

/* Category Filter */
.jhs-category-filter {
    margin: 15px 0;
    padding: 10px;
    background: #f0f0f0;
}

.jhs-category-filter select {
    padding: 5px;
    font-size: 14px;
    margin-left: 10px;
}

/* Events Table */
.jhs-events-table {
    margin: 20px 0;
    width: 100%;
}

.jhs-event-row {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
    width: 100%;
}

.jhs-event-row:hover {
    background: #f9f9f9;
}

.jhs-event-date {
    flex: 0 0 100px;
    text-align: right;
    font-size: 13px;
}

.jhs-event-date a {
    color: #0066cc;
    text-decoration: none;
}

.jhs-event-date a:hover {
    text-decoration: underline;
}

.jhs-event-score {
    flex: 0 0 40px;
    text-align: center;
    font-weight: bold;
    color: #666;
    font-size: 13px;
}

.jhs-event-icon {
    flex: 0 0 30px;
    text-align: center;
    font-size: 16px;
}

.jhs-event-icon a {
    text-decoration: none;
}

.jhs-event-description {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    min-width: 0; /* Allows flex item to shrink below content size */
    word-wrap: break-word;
}

.jhs-event-description strong {
    background: #ffff00;
    padding: 0 2px;
}

.jhs-event-meta {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
}

.jhs-event-meta p {
    margin: 5px 0;
    line-height: 1.6;
}

/* Alpha Results */
.jhs-alpha-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.jhs-alpha-item {
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #eee;
}

.jhs-alpha-item a {
    color: #0066cc;
    text-decoration: none;
    word-wrap: break-word;
}

.jhs-alpha-item a:hover {
    text-decoration: underline;
}

/* Pagination */
.jhs-pagination {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    text-align: center;
    line-height: 2;
}

.jhs-pagination a {
    color: #0066cc;
    text-decoration: none;
    padding: 5px 10px;
    margin: 0 2px;
    display: inline-block;
}

.jhs-pagination a:hover {
    text-decoration: underline;
    background: #e6e6e6;
}

.jhs-page-current {
    font-weight: bold;
    padding: 5px 10px;
    margin: 0 2px;
    background: #0066cc;
    color: white;
    border-radius: 3px;
    display: inline-block;
}

.jhs-next-link {
    margin-left: 15px;
    font-weight: bold;
}

.jhs-result-count {
    margin: 10px 0;
    color: #666;
    font-size: 13px;
}

/* Headings */
h3 {
    font-size: 18px;
    margin: 20px 0 15px 0;
    color: #333;
}

h4 {
    font-size: 16px;
    margin: 15px 0 10px 0;
    color: #444;
}

/* Help Page */
.jhs-help-section {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-left: 4px solid #0066cc;
}

.jhs-help-section p {
    margin: 10px 0;
    line-height: 1.6;
}

.jhs-help-section ul {
    margin: 10px 0 10px 20px;
    line-height: 1.8;
}

.jhs-help-section code {
    background: #fff;
    padding: 2px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jhs-event-row {
        flex-wrap: wrap;
    }
    
    .jhs-event-date {
        flex: 0 0 80px;
        font-size: 12px;
    }
    
    .jhs-event-score {
        flex: 0 0 30px;
    }
    
    .jhs-event-icon {
        flex: 0 0 25px;
    }
    
    .jhs-event-description {
        flex: 0 0 100%;
        margin-top: 5px;
    }
    
    .jhs-alpha-results {
        grid-template-columns: 1fr;
    }
    
    .jhs-search-input {
        width: 100%;
        margin-top: 10px;
    }
    
    .jhs-navigation {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .jhs-database-wrapper {
        padding: 10px;
        font-size: 13px;
    }
    
    .jhs-event-row {
        padding: 10px 0;
    }
    
    .jhs-event-description {
        font-size: 13px;
    }
}