/* Container Wrapper */
.mgf-filter-container {
    max-width: 1200px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Filter Bar Styling */
.mgf-filter-wrap {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: opacity 0.2s ease;
}

.mgf-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.mgf-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mgf-filter-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mgf-filter-field select,
.mgf-filter-field input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background-color: #f8fafc;
    color: #2d3748;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.15s ease-in-out;
}

.mgf-filter-field select:focus,
.mgf-filter-field input[type="text"]:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
    background-color: #ffffff;
}

/* Loading state transition */
.mgf-filter-wrap.is-loading,
.mgf-grid-container.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Grid & Restoration Card Layout */
.mgf-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.mgf-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mgf-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Image Comparison Panels */
.mgf-image-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #1a202c;
    aspect-ratio: 16/10;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid #e2e8f0;
}

.mgf-img-side {
    position: relative;
    height: 100%;
    width: 100%;
}

.mgf-img-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mgf-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mgf-after .mgf-badge {
    left: auto;
    right: 8px;
    background: #2f855a;
}

/* Card Content Details */
.mgf-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.mgf-card-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    line-height: 1.4;
}

.mgf-card-title a {
    color: #1a202c;
    text-decoration: none;
    transition: color 0.15s ease;
}

.mgf-card-title a:hover {
    color: #3182ce;
}

.mgf-card-excerpt {
    font-size: 0.9rem;
    color: #718096;
    margin: 0 0 1.25rem 0;
    line-height: 1.5;
}

/* Metadata Tags */
.mgf-card-meta {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mgf-meta-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-weight: 500;
}

.material-tag { background: #ebf8ff; color: #2b6cb0; }
.damage-tag { background: #fff5f5; color: #c53030; }
.era-tag { background: #f7fafc; color: #4a5568; }

/* Status & Loader messages */
.mgf-initial-loader,
.mgf-no-results,
.mgf-error {
    text-align: center;
    padding: 3rem 1rem;
    background: #f7fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    color: #718096;
    font-size: 1rem;
}