/**
 * Creations Gallery Styles
 * Witit - AI Image Generator
 */

/* Creations Panel (Full Screen Overlay) */
.creations-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 6, 10, 0.98);
    backdrop-filter: blur(20px);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s ease,
                visibility 0.35s ease;
}

.creations-panel.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* Creations Header */
.creations-header {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 16px;
}

.creations-title {
    font-size: 20px;
    font-weight: 600;
    color: white;
    flex: 1;
    margin: 0;
}

/* View Toggle Buttons */
.creations-view-toggle {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 8px;
}

.creations-view-toggle .view-btn {
    background: transparent;
    border: none;
    padding: 6px 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.creations-view-toggle .view-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.creations-view-toggle .view-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Search Bar */
.creations-search {
    padding: 12px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.creations-search input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.creations-search input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.4);
}

.creations-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Creations Content */
.creations-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Gallery Grid View */
.creations-gallery.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

/* Gallery List View */
.creations-gallery.list-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Default gallery class */
.creations-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

/* Creation Card - Grid View */
.creation-card.grid-view {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.2s ease;
}

.creation-card.grid-view:hover {
    transform: scale(1.02);
}

.creation-card.grid-view img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creation-card.grid-view .creation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 8px;
}

.creation-card.grid-view:hover .creation-overlay {
    opacity: 1;
}

/* Creation Card - List View */
.creation-card.list-view {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.creation-card.list-view:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.creation-card.list-view img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.creation-card.list-view .creation-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.creation-prompt {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.creation-personas {
    color: rgba(0, 212, 255, 0.8);
    font-size: 12px;
}

.creation-date {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

/* Delete Button */
.creation-delete-btn {
    background: rgba(255, 80, 80, 0.2);
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.creation-delete-btn:hover {
    background: rgba(255, 80, 80, 0.4);
}

.creation-delete-btn svg {
    width: 18px;
    height: 18px;
    stroke: rgba(255, 80, 80, 0.9);
}

/* Empty State */
.creations-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    grid-column: 1 / -1;
}

.creations-empty svg {
    width: 64px;
    height: 64px;
    stroke: rgba(255, 255, 255, 0.2);
    margin-bottom: 16px;
}

.creations-empty p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    margin: 0 0 8px 0;
}

.creations-empty span {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

/* Loading State */
.creations-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    grid-column: 1 / -1;
}

/* Error State */
.creations-error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: rgba(255, 80, 80, 0.8);
    font-size: 14px;
    grid-column: 1 / -1;
}

/* Pagination */
#creationsPagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pagination-info {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination-controls button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-controls button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.pagination-controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-controls span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

/* Sidebar Button - matches other sidebar buttons */
.creations-sidebar-btn {
    width: 100%;
    margin-top: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.creations-sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 170, 0, 0.3);
    color: white;
}

.creations-sidebar-btn svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .creations-header {
        padding: 12px 16px;
        flex-wrap: wrap;
    }

    .creations-title {
        font-size: 18px;
    }

    .creations-search {
        padding: 12px 16px;
    }

    .creations-content {
        padding: 12px;
    }

    .creations-gallery.grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .creation-card.list-view img {
        width: 60px;
        height: 60px;
    }
}

@media (min-width: 1024px) {
    .creations-gallery.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

