/* database.css - Styles for database.html and database-en.html */
/* Fonts loaded via <link> tags in HTML for better performance */

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #fafafa;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header and Navigation */
header {
    background-color: #800000;
    color: white;
    padding: 1em;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.site-title {
    font-family: 'Aboreto', cursive;
    font-size: 1.8em;
    font-weight: bold;
    margin-right: auto;
    color: white;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

nav ul li {
    display: inline;
}

nav a {
    text-decoration: none;
    color: white;
    padding: 0.5em;
    transition: all 0.2s ease-in-out;
}

nav a:hover,
nav a:focus {
    color: #ffcccb;
    text-decoration: underline;
}

.nav-github {
    font-size: 1.5em;
    margin-left: 10px;
}

.button {
    background-color: #a52a2a;
    color: white;
    border: none;
    padding: 0.4em 0.5em;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.button:hover,
.button:focus {
    background-color: #c04040;
}

/* Screen-reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Main Content */
main {
    flex: 1;
    max-width: 800px;
    width: 100%;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

h1 {
    color: #800000;
    font-size: 2em;
    margin-bottom: 15px;
}

h2 {
    color: #800000;
    font-size: 1.5em;
    margin-top: 40px;
    margin-bottom: 20px;
}

p {
    margin-bottom: 10px;
}

a {
    color: #800000;
}

hr {
    border: none;
    border-top: 2px solid #ddd;
    margin: 20px 0;
}

/* Downloads section */
.downloads-section ul {
    list-style-position: outside;
    padding-left: 0;
    margin-left: 20px;
}

.downloads-section li {
    margin-bottom: 20px;
    line-height: 1.8;
}

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

.downloads-section li p {
    margin: 0;
}

/* Search Box */
.search-box {
    background: #fafafa;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    transition: all 0.3s;
}

.search-box:hover {
    box-shadow: 0 4px 15px rgba(128, 0, 0, 0.1);
    border-color: #a52a2a;
}

.search-group {
    margin-bottom: 20px;
}

.search-group:last-of-type {
    margin-bottom: 0;
}

.search-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #800000;
    font-size: 0.95em;
}

.search-group label b {
    color: #600000;
}

.search-group label span {
    color: #999;
    font-weight: 400;
}

.search-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

select {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    color: #333;
}

select:focus {
    outline: none;
    border-color: #800000;
    box-shadow: 0 0 0 3px rgba(128, 0, 0, 0.1);
}

input[type="text"],
input[type="number"] {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #800000;
    box-shadow: 0 0 0 3px rgba(128, 0, 0, 0.1);
}

.checkbox-group {
    display: flex;
    gap: 20px;
    padding: 10px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #333;
    font-weight: 500;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #800000;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #800000 0%, #600000 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a52a2a 0%, #800000 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(128, 0, 0, 0.3);
}

.btn-secondary {
    background: white;
    color: #800000;
    border: 2px solid #800000;
}

.btn-secondary:hover {
    background: #800000;
    color: white;
}

/* Results Section */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px 0;
    border-bottom: 2px solid #ddd;
}

.result-count {
    font-size: 1.1em;
    color: #800000;
    font-weight: 600;
}

/* Table */
.sticky-table-container {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: white;
    margin: 20px 0;
}

.sticky-table-container table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sticky-table-container th,
.sticky-table-container td {
    white-space: normal;
    word-wrap: break-word;
    border-bottom: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.sticky-table-container th {
    background-color: #f9f9f9;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sticky-table-container th:nth-child(1),
.sticky-table-container td:nth-child(1) {
    font-size: 0.9em;
    color: #555;
}

.sticky-table-container th:nth-child(2),
.sticky-table-container td:nth-child(2) {
    position: sticky;
    left: 0;
    background-color: #fff;
    z-index: 2;
    font-style: italic;
}

.sticky-table-container thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.sticky-table-container thead th:nth-child(2) {
    left: 0;
    z-index: 3;
}

.sticky-table-container tr:hover {
    background-color: #fff5f5;
}

/* Footer */
footer {
    background-color: #fff;
    color: #888;
    text-align: center;
    padding: 0.75em 1em;
    font-size: 0.82em;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

footer a {
    color: #800000;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-row {
        flex-direction: column;
    }

    select {
        width: 100%;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    table, th, td {
        font-size: 14px;
    }
}
