/**
 * artistproCLOUD Frontend Styles
 */

/* File embed */
.nextcloud-file-embed {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: #1d2327;
    transition: all 0.2s;
}

.nextcloud-file-embed:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.nextcloud-file-embed .file-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 6px;
    font-size: 18px;
}

.nextcloud-file-embed .file-info {
    flex: 1;
}

.nextcloud-file-embed .file-name {
    font-weight: 500;
    display: block;
}

.nextcloud-file-embed .file-size {
    font-size: 12px;
    color: #6c757d;
}

.nextcloud-file-embed .download-icon {
    color: #6c757d;
}

/* Folder listing */
.nextcloud-folder-listing {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.nextcloud-folder-listing .folder-header {
    background: #f8f9fa;
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

.nextcloud-folder-listing .file-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nextcloud-folder-listing .file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f3f4;
}

.nextcloud-folder-listing .file-item:last-child {
    border-bottom: none;
}

.nextcloud-folder-listing .file-item:hover {
    background: #f8f9fa;
}

.nextcloud-folder-listing .file-item a {
    flex: 1;
    color: #1d2327;
    text-decoration: none;
}

.nextcloud-folder-listing .file-item a:hover {
    color: #0073aa;
}

.nextcloud-folder-listing .file-size {
    color: #6c757d;
    font-size: 13px;
}

/* Gallery */
.nextcloud-gallery {
    display: grid;
    grid-template-columns: repeat(var(--columns, 3), 1fr);
    gap: 10px;
}

.nextcloud-gallery .gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.nextcloud-gallery .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.nextcloud-gallery .gallery-item:hover img {
    transform: scale(1.05);
}

/* Lightbox */
.nextcloud-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nextcloud-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.nextcloud-lightbox .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.nextcloud-lightbox .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.nextcloud-lightbox .nav-btn.prev {
    left: 20px;
}

.nextcloud-lightbox .nav-btn.next {
    right: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .nextcloud-gallery {
        --columns: 2 !important;
    }
}

@media (max-width: 480px) {
    .nextcloud-gallery {
        --columns: 1 !important;
    }
}
