/* ── Google Drive Viewer ─────────────────────────────────────── */

.um-gdrive-root {
    font-family: inherit;
}

.um-gdrive-loading,
.um-gdrive-error {
    padding: 12px;
    font-size: 14px;
    color: #555;
}

.um-gdrive-error {
    color: #c00;
}

/* Папкалар */
.um-folder {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 6px;
    overflow: hidden;
}

.um-folder-header {
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    background: #f7f7f7;
    transition: background .15s;
    user-select: none;
}

.um-folder-header:hover {
    background: #eeeeee;
}

.um-folder-body {
    display: none;
    padding: 8px 14px;
    background: #fff;
}

/* Файлдар */
.um-drive-level {
    margin: 0;
    padding: 0;
}

.um-file {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.um-file:last-child { border-bottom: none; }

.um-file a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 2px 0;
}

.um-file a:hover {
    color: var(--wp--preset--color--primary, #0073aa);
}

.um-video {
    cursor: pointer;
    color: #333;
    font-weight: 500;
    padding: 6px 0;
}

.um-video:hover { color: #0073aa; }

/* Суреттер grid — ТҮЗЕТІЛДІ (.um-image-item → .um-image-grid .um-image-item) */
.um-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.um-image-grid .um-image-item {
    overflow: hidden;
    border-radius: 6px;
}

.um-image-grid .um-image-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform .2s ease;
    display: block;
}

.um-image-grid .um-image-item img:hover {
    transform: scale(1.04);
}

/* Жүктеу батырмасы */
.um-load-more {
    display: block;
    margin: 10px auto 0;
    font-size: 13px;
}

/* Video modal */
.um-video-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.80);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.um-video-box {
    position: relative;
    max-width: 900px;
    width: 90%;
    margin: auto;
    background: #000;
    border-radius: 8px;
}

.um-video-box iframe {
    width: 100%;
    height: 500px;
    border: 0;
    border-radius: 0 0 8px 8px;
    display: block;
}

.um-video-close {
    position: absolute;
    top: -38px;
    right: 0;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    z-index: 100000;
}

/* Lightbox */
.um-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.um-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

.um-lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    z-index: 100000;
}
