/* =============================================================================
   PAINTINGS.CSS
   Order follows paintings.ejs: filters → error → gallery
   ============================================================================= */

/* =============================================================================
   FILTER SECTION
   ============================================================================= */

.filter-section {
    border: 1px solid var(--BaseColor);
    padding: 10px;
    margin: 10px auto;
    border-radius: 8px;
    max-width: 1200px;
    font-size: 0.8rem;
}

.filter-active {
    color: var(--AccentColor);
    padding-bottom: 6px;
    font-size: 0.9rem;
}

.filter-value {
    font-size: 0.8rem;
    font-weight: bold;
}

.filter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-form label {
    font-weight: bold;
    width: 70px;

}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    /* prevents label wrapping away from select */
}

.filter-form select {
    padding: 2px 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    min-width: 150px;
}

.filter-form select:hover {
    border-color: #4CAF50;
}

.filter-form select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.clear-filter {
    padding: 8px 16px;
    background-color: #888;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: auto;
}

.clear-filter:hover {
    background-color: #666;
}

/* =============================================================================
   FILTER ERROR MESSAGE
   ============================================================================= */

.filter-error {

    color: var(--ErrorColor);

    margin-top: 30px;
    margin-left: auto;
    margin-right: auto;
    padding: 5px;
    border: 1px solid;
    max-width: 50%;
    text-align: center;
}

/* =============================================================================
   GALLERY GRID
   ============================================================================= */

.gallery-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    column-gap: 5px;
    width: 80vw;
    margin-left: auto;
    margin-right: auto;
    padding: 12px;
}

.gallery-item {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 0;
    padding-bottom: 4px;
    border-bottom: 1px dotted;
}

.image-wrapper {
    display: inline-block;
    border: 1px solid rgb(163, 196, 225);
    padding: 5px;
    margin-top: 12px;
}

.image-wrapper:hover {
    padding: 4px;
    border: 2px solid rgb(206, 220, 234);
}

.smallimage {
    max-width: 10rem;
    width: auto;
    object-fit: contain;
    display: block;
}

.imagecaption {
    height: fit-content;
    margin-top: 12px;
    margin-left: 8px;
    width: 35%;
    text-align: center;
    border: 1px solid;
    padding: 5px;
    font-size: 0.7rem;
}

.smallimage-title {
    font-size: 1.0rem;
    background-color: Var(--Title-Background-Color);

}

/* =============================================================================
   MISC (possibly unused)
   ============================================================================= */

.paintings-title {
    border: 1px solid;
    padding: 8px 0;
    text-align: center;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

/* Responsive: single column on smaller screens */
@media (max-width: 1000px) {
    .gallery-container {
        grid-template-columns: 1fr;
    }
}