/**
 * Google Elite Pro - Frontend CSS
 * Estilos para interface do usuário
 */

/* Reset e base */
.gep-drive-index {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.gep-drive-index * {
    box-sizing: border-box;
}

/* Barra de busca */
.gep-search-bar {
    display: flex;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    gap: 10px;
}

.gep-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.gep-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.gep-search-btn {
    padding: 12px 24px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.gep-search-btn:hover {
    background: #005a87;
}

/* Breadcrumb */
.gep-breadcrumb {
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.gep-breadcrumb-item {
    color: #007cba;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.gep-breadcrumb-item:hover {
    background: #f0f8ff;
}

.gep-breadcrumb-separator {
    color: #666;
    margin: 0 2px;
}

.gep-search-results {
    color: #666;
    font-style: italic;
}

/* Toolbar */
.gep-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
}

.gep-view-options {
    display: flex;
    gap: 5px;
}

.gep-view-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.gep-view-btn:hover {
    background: #f8f9fa;
}

.gep-view-btn.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.gep-sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

/* Loading */
.gep-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.gep-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: gep-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes gep-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error */
.gep-error {
    text-align: center;
    padding: 60px 20px;
    color: #d63384;
}

.gep-error-message {
    margin-bottom: 20px;
    font-size: 16px;
}

.gep-retry-btn {
    padding: 10px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.gep-retry-btn:hover {
    background: #005a87;
}

/* File Grid */
.gep-file-grid {
    padding: 20px;
    min-height: 300px;
}

/* Grid View */
.gep-file-grid.gep-view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.gep-file-item.gep-file-grid {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.gep-file-item.gep-file-grid:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.1);
    transform: translateY(-2px);
}

.gep-file-thumbnail {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.gep-file-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.gep-file-thumbnail i {
    font-size: 32px;
    color: #666;
}

.gep-file-name {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 8px;
    word-break: break-word;
    line-height: 1.4;
}

.gep-file-size {
    font-size: 12px;
    color: #666;
}

/* List View */
.gep-file-grid.gep-view-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.gep-file-item.gep-file-list {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.2s;
}

.gep-file-item.gep-file-list:hover {
    background: #f8f9fa;
}

.gep-file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.gep-file-icon i {
    font-size: 20px;
    color: #666;
}

.gep-file-details {
    flex: 1;
    min-width: 0;
}

.gep-file-details .gep-file-name {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gep-file-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
}

.gep-file-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.gep-file-item:hover .gep-file-actions {
    opacity: 1;
}

.gep-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.gep-action-btn:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Folder específico */
.gep-folder .gep-file-thumbnail,
.gep-folder .gep-file-icon {
    background: #fff3cd;
}

.gep-folder .gep-file-thumbnail i,
.gep-folder .gep-file-icon i {
    color: #856404;
}

/* Tipos de arquivo */
.gep-icon-folder::before { content: "📁"; }
.gep-icon-video::before { content: "🎬"; }
.gep-icon-audio::before { content: "🎵"; }
.gep-icon-image::before { content: "🖼️"; }
.gep-icon-pdf::before { content: "📄"; }
.gep-icon-text::before { content: "📝"; }
.gep-icon-file::before { content: "📄"; }
.gep-icon-download::before { content: "⬇️"; }
.gep-icon-play::before { content: "▶️"; }
.gep-icon-home::before { content: "🏠"; }
.gep-icon-prev::before { content: "◀️"; }
.gep-icon-next::before { content: "▶️"; }
.gep-icon-grid::before { content: "⊞"; }
.gep-icon-list::before { content: "☰"; }

/* Paginação */
.gep-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.gep-page-btn {
    padding: 8px 16px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gep-page-btn:hover {
    background: #005a87;
}

.gep-page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.gep-page-info {
    font-size: 14px;
    color: #666;
}

/* Empty folder */
.gep-empty-folder {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.gep-empty-folder p {
    font-size: 16px;
    margin: 0;
}

/* Modal de vídeo */
.gep-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: gep-fadeIn 0.3s;
}

.gep-modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    max-height: 90%;
    overflow: hidden;
    animation: gep-slideIn 0.3s;
}

.gep-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.gep-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.gep-modal-body {
    padding: 0;
}

.gep-video-player-modal {
    background: #000;
    position: relative;
}

.gep-video-player-modal video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    display: block;
}

.gep-video-info {
    padding: 20px;
    background: #fff;
}

.gep-video-info h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
}

.gep-video-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.gep-video-actions {
    display: flex;
    gap: 10px;
}

.gep-download-btn {
    padding: 10px 20px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.gep-download-btn:hover {
    background: #005a87;
    color: white;
}

/* Animações */
@keyframes gep-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gep-slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Temas */
.gep-theme-dark {
    background: #1a1a1a;
    color: #fff;
}

.gep-theme-dark .gep-search-bar,
.gep-theme-dark .gep-breadcrumb,
.gep-theme-dark .gep-toolbar,
.gep-theme-dark .gep-pagination {
    background: #2d2d2d;
    border-color: #404040;
}

.gep-theme-dark .gep-file-item {
    background: #2d2d2d;
    border-color: #404040;
    color: #fff;
}

.gep-theme-dark .gep-file-item:hover {
    background: #3d3d3d;
}

.gep-theme-dark .gep-search-input,
.gep-theme-dark .gep-sort-select {
    background: #2d2d2d;
    border-color: #404040;
    color: #fff;
}

/* Responsivo */
@media (max-width: 768px) {
    .gep-file-grid.gep-view-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .gep-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .gep-view-options {
        justify-content: center;
    }
    
    .gep-breadcrumb {
        font-size: 12px;
    }
    
    .gep-file-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .gep-modal-content {
        width: 95%;
        margin: 2% auto;
    }
}

@media (max-width: 480px) {
    .gep-file-grid.gep-view-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .gep-search-bar {
        flex-direction: column;
    }
    
    .gep-pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .gep-file-actions {
        opacity: 1;
    }
}

/* Player específico */
.gep-video-player {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.gep-video-player video {
    width: 100%;
    height: 100%;
    display: block;
}

/* Plyr customization */
.plyr {
    border-radius: 8px;
}

.plyr--video {
    background: #000;
}

/* Video.js customization */
.video-js {
    border-radius: 8px;
}

/* Acessibilidade */
.gep-drive-index :focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.gep-drive-index button:focus,
.gep-drive-index a:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .gep-drive-index {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .gep-search-bar,
    .gep-toolbar,
    .gep-pagination,
    .gep-file-actions {
        display: none;
    }
}