/* Render Gallery Styles */

/* Gallery container - sits below the buttons row */
.render-gallery-section {
    width: 100%;
    padding: 8px 12px;
    box-sizing: border-box;
    display: none; /* Hidden until renders exist */
}

.render-gallery-section.has-renders {
    display: block;
}

.render-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.render-gallery-header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.render-gallery-clear-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.render-gallery-clear-btn:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* Scrollable thumbnail strip */
.render-gallery-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0 8px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.render-gallery-strip::-webkit-scrollbar {
    height: 4px;
}

.render-gallery-strip::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.render-gallery-strip::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.render-gallery-strip::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Individual render thumbnail */
.render-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: #f0f0f0;
}

.render-thumbnail:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.render-thumbnail.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3);
}

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

/* Render label overlay */
.render-thumbnail-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    font-size: 10px;
    padding: 12px 6px 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Delete button on thumbnail */
.render-thumbnail-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 0;
}

.render-thumbnail:hover .render-thumbnail-delete {
    opacity: 1;
}

.render-thumbnail-delete:hover {
    background: #dc3545;
}

/* Save Render button styling */
#save-render-btn {
    display: none; /* Hidden until preview is active */
}

#save-render-btn .icon {
    font-size: 14px;
}

/* Saving animation */
.render-gallery-section.saving {
    opacity: 0.7;
    pointer-events: none;
}

/* Empty state */
.render-gallery-empty {
    text-align: center;
    padding: 12px;
    color: #999;
    font-size: 12px;
    font-style: italic;
}

/* Syncing indicator */
.render-sync-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
}

.render-sync-indicator.synced {
    background: #28a745;
}

.render-sync-indicator.syncing {
    background: #ffc107;
    animation: pulse 1s infinite;
}

.render-sync-indicator.error {
    background: #dc3545;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
