/* Polish Looted Art Database Styles */

:root {
    --primary: #8B0000;
    --secondary: #DC143C;
    --background: #F5F5F5;
    --card-bg: #FFFFFF;
    --text: #333333;
    --border: #DDDDDD;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

header h1 {
    color: var(--primary);
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

#searchInput {
    flex: 1;
    max-width: 500px;
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: 5px;
    font-size: 16px;
}

button {
    padding: 12px 24px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--secondary);
}

button:disabled {
    background-color: #CCCCCC;
    cursor: not-allowed;
}

#clearBtn {
    background-color: #666;
}

#clearBtn:hover {
    background-color: #888;
}

.stats {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #666;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
}

#artworkTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

#artworkTable thead {
    background-color: var(--primary);
    color: white;
}

#artworkTable th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.header-filter {
    display: block;
    margin-top: 5px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 0.85em;
    font-weight: normal;
    cursor: pointer;
    min-width: 120px;
}

.header-filter:hover {
    background-color: white;
}

.header-filter:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

#artworkTable tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}

#artworkTable tbody tr.clickable-row {
    cursor: pointer;
}

#artworkTable tbody tr:hover {
    background-color: #F9F9F9;
}

#artworkTable td {
    padding: 12px;
    vertical-align: top;
}

.vision-status-cell {
    text-align: center;
    font-size: 1.2em;
    white-space: nowrap;
}

.table-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
    background-color: #F0F0F0;
}

.table-thumbnail:hover {
    transform: scale(1.1);
}

.no-image-placeholder {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F0F0F0;
    border-radius: 5px;
    color: #999;
    font-size: 0.75em;
    text-align: center;
}

.artwork-title-cell {
    font-weight: 600;
    color: var(--primary);
    max-width: 200px;
}

.artwork-artist-cell {
    max-width: 150px;
}

.artwork-year-cell {
    white-space: nowrap;
}

.artwork-status {
    display: inline-block;
    padding: 4px 8px;
    background-color: var(--secondary);
    color: white;
    font-size: 0.85em;
    border-radius: 3px;
    white-space: nowrap;
}

.artwork-status.recovered {
    background-color: #28a745;
}

.artwork-status.suspected {
    background-color: #ffc107;
    color: #333;
}

.artwork-location-cell {
    max-width: 150px;
    color: #666;
}

.artwork-description-cell {
    max-width: 300px;
    font-size: 0.9em;
    color: #555;
    line-height: 1.4;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

#pageInfo {
    font-size: 1.1em;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 30px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: var(--primary);
}

.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.8em;
    color: var(--primary);
    margin-bottom: 10px;
}

.modal-detail {
    margin-bottom: 15px;
}

.modal-label {
    font-weight: bold;
    color: #555;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #666;
}

.error {
    text-align: center;
    padding: 40px;
    color: var(--secondary);
    font-size: 1.1em;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .search-section {
        flex-direction: column;
    }
    
    #searchInput {
        max-width: 100%;
    }
    
    .table-container {
        font-size: 0.85em;
    }
    
    #artworkTable th,
    #artworkTable td {
        padding: 8px 6px;
    }
    
    .table-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .no-image-placeholder {
        width: 60px;
        height: 60px;
        font-size: 0.65em;
    }
}
