.viewer-layout {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.left-column {
    width: 48%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.right-column {
    width: 48%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.viewer-card {
    background-color: #ecf0f1;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.viewer-card h3 {
    color: #2980b9;
    font-size: 1.3em;
    margin-bottom: 8px;
}

.viewer-card p {
    font-size: 0.9em;
    line-height: 1.4;
    margin-bottom: 8px;
}

select {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
}

.full-width-table {
    width: 100%;
    overflow-x: auto;
}

.full-width-table {
    overflow-x: auto;
}

.table-container {
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

table {
    width: 100%;
    min-width: 600px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.search-container {
    width: 300px;
    margin: 0;
}

#searchInput {
    width: 100%;
    height: 30px;
    padding: 0 15px;
    font-size: 14px;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#searchInput:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

#searchInput::placeholder {
    color: #bdc3c7;
}

.type-buttons {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.type-button {
    flex: 1;
    padding: 8px 25px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    min-height: 35px;
    white-space: nowrap;
}

.type-button:hover {
    background-color: #e0e0e0;
}

.type-button.active {
    background-color: #2980b9;
    color: white;
    border-color: #2475a8;
}

table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.download-button {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.download-button:hover {
    background-color: #219a52;
}

.quick-access {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    width: 100%;
    box-sizing: border-box;
}

.quick-access h2 {
    font-size: 1.1em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.quick-access-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.quick-access-button {
    background-color: #ecf0f1;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.9em;
    color: #2980b9;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.quick-access-button:hover {
    background-color: #2980b9;
    color: white;
    border-color: #2475a8;
}

.quick-access-button .entity-type {
    font-size: 0.8em;
    color: #7f8c8d;
    margin-left: 5px;
    padding-left: 5px;
    border-left: 1px solid #bdc3c7;
}

.quick-access-button:hover .entity-type {
    color: #ecf0f1;
    border-left-color: #ecf0f1;
}

table th {
    cursor: pointer;
    user-select: none;  /* Prevents text selection when clicking */
}

table th.active-asc::after {
    content: " ↑";
    color: #b3d4ef;
}

table th.active-desc::after {
    content: " ↓";
    color: #b3d4ef;
}

.table-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 35px;
}

.country-filter select {
    padding: 6px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 15px;
    font-size: 14px;
    color: #2c3e50;
    background-color: white;
    min-width: 150px;
    height: 30px;
    margin: 0;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232c3e50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.country-filter select:hover {
    border-color: #95a5a6;
}

.country-filter select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.multi-layer-select {
    width: 200px;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
}

.multi-layer-select optgroup {
    font-weight: bold;
    color: #2c3e50;
    background-color: #f8f9fa;
}

.multi-layer-select option {
    padding: 8px;
    background-color: #fff;
    color: #2c3e50;
}

.multi-layer-select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.entity-selector-container {
    margin-bottom: 1rem;
}

.show-extensions {
    margin-bottom: 0.5rem;
}

.show-extensions input[type="checkbox"] {
    margin-right: 0.5rem;
}

.entity-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    width: 100%;
}

.entity-title-row h2 {
    margin: 0;
    font-size: 1.4em;
    line-height: 1;
}

.show-extensions {
    display: flex;
    align-items: center;
    font-size: 0.9em;
    color: #2c3e50;
    margin: 0;
    padding: 0;
    height: auto;
}

.show-extensions input[type="checkbox"] {
    margin: 0 0.5rem 0 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
    border: 2px solid #bdc3c7;
    border-radius: 3px;
    accent-color: #2980b9;
    position: relative;
    top: 0;
}

.show-extensions label {
    cursor: pointer;
    line-height: 1;
    padding-top: 1px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-content h2 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.modal-content p {
    color: #34495e;
    line-height: 1.5;
    margin-bottom: 15px;
}

.load-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.load-options button {
    flex: 1;
    padding: 10px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.load-options button:hover {
    background: #2980b9;
}

.custom-query {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}

.custom-query input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.custom-query button {
    width: 100%;
    padding: 10px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.custom-query button:hover {
    background: #27ae60;
}

.close-button {
    width: 100%;
    padding: 10px;
    margin-top: 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.close-button:hover {
    background: #c0392b;
}

/* pagination controls styling */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    padding: 10px;
}

.pagination-controls button {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-controls button:hover:not([disabled]) {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-controls span {
    color: #6c757d;
    font-size: 0.9em;
}
