/* Screenshot Management Modal Styles
   Now uses data-component="dialog" from design system.
   Only visibility toggling and gallery-specific styles needed here.
*/

#screenshot_modal {
    display: none;
}

#screenshot_modal.show {
    display: flex;
}

/* ============================
   Screenshot Gallery Grid
   ============================ */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 0;
}

/* Screenshot Card */
.screenshot-card {
    background: var(--surface-raised-base, rgba(0,0,0,0.02));
    border: 1px solid var(--border-weak-base, rgba(0,0,0,0.12));
    border-radius: var(--radius-md, 6px);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.screenshot-card:hover {
    border-color: var(--border-base, rgba(0,0,0,0.2));
    box-shadow: var(--shadow-xs, 0 1px 3px rgba(0,0,0,0.08));
}

.screenshot-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.screenshot-card-info {
    padding: 8px 10px;
    font-family: var(--font-family-sans, sans-serif);
    font-size: var(--font-size-small, 13px);
    color: var(--text-weak, #666);
    border-top: 1px solid var(--border-weak-base, rgba(0,0,0,0.08));
}

.screenshot-card-actions {
    padding: 4px 10px 8px;
    display: flex;
    gap: 6px;
}

/* ============================
   Screenshot States
   ============================ */
.screenshot-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-weak-base, #ddd);
    border-top-color: var(--icon-base, #888);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button loading state */
.screenshot-btn-loading {
    opacity: 0.6;
    pointer-events: none;
}

.screenshot-btn-spinning {
    opacity: 0.6;
    pointer-events: none;
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 600px) {
    .screenshot-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
}
