/* Grid Styles */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 30px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
}

.grid-header {
    display: grid;
    grid-template-columns: 80px 1.5fr 1fr 1fr 1fr 1fr;
    background: #4285f4;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    font-size: 0.9rem;
    border-bottom: 1px solid #dee2e6;
}

.grid-header-cell {
    padding: 8px 10px;
    position: relative;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

    .grid-header-cell:last-child {
        border-right: none;
    }

.grid-item {
    background: white;
    transition: all 0.3s ease;
}

    .grid-item:nth-child(even) {
        background-color: #f8f9fa;
    }

    .grid-item:hover {
        background-color: #e8f0fe;
    }

.grid-row {
    display: grid;
    grid-template-columns: 80px 1.5fr 1fr 1fr 1fr 1fr;
    padding: 0;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}

.cell {
    padding: 10px 15px;
    position: relative;
    border-right: 1px solid #dee2e6;
    min-height: 60px;
    display: flex;
    align-items: center;
}

    .cell:last-child {
        border-right: none;
    }

    /* Status & Actions Column */
    .cell[data-label="Status & Actions"] {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 8px;
    }

/* Preview section styling */
.preview-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-title {
    font-weight: 600;
    color: #1a73e8;
    margin-bottom: 2px;
    font-size: 0.95rem;
}

.preview-content {
    font-size: 0.85rem;
    color: #5f6368;
    line-height: 1.4;
}

/* Preview Icon Container */
.preview-icon-container {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f1f3f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-icon {
    font-size: 1.5rem;
    color: #5f6368;
    cursor: pointer;
}

/* NEW: Icon colors for different file types */
.bi-filetype-pdf {
    color: #d93025;
}

.bi-filetype-docx {
    color: #2b579a;
}

.bi-filetype-xlsx {
    color: #217346;
}

.bi-filetype-pptx {
    color: #d24726;
}

.bi-play-btn {
    color: #ff0000;
}

.preview-action-icon {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.preview-icon-container:hover .preview-action-icon {
    opacity: 1;
}

.preview-thumbnail:hover {
    transform: scale(1.05);
}

/* Action buttons container */
.actions-cell {
    display: flex;
    gap: 6px;
    margin-top: 0;
    flex-wrap: nowrap; /* Keep buttons in a single row */
}

/* Action buttons */
.action-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    font-size: 0.9rem;
    flex-shrink: 0;
}

    .action-btn:hover {
        transform: scale(1.1);
    }

.approve-btn {
    background-color: #28a745;
    color: white;
}

.edit-btn {
    background-color: #17a2b8;
    color: white;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
    width: 80px;
}

.badge-approved {
    background-color: #d4edda;
    color: #155724;
}

.badge-pending {
    background-color: #fff3cd;
    color: #856404;
}

/* Responsive design */
@media (max-width: 992px) {
    .grid-header {
        display: none;
    }

    .grid-row {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        border-bottom: 1px solid #dee2e6;
    }

    .cell {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        padding: 10px 15px;
    }

        .cell::before {
            content: attr(data-label);
            font-weight: bold;
            display: block;
            margin-bottom: 5px;
            color: #6c757d;
            font-size: 0.85rem;
        }

        .cell:last-child {
            border-bottom: none;
        }

    .preview-icon-container {
        width: 40px;
        height: 40px;
    }

    .cell[data-label="Status & Actions"] {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .actions-cell {
        justify-content: flex-start;
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .actions-cell {
        flex-wrap: wrap;
    }

    .action-btn {
        margin-bottom: 5px;
    }
}

/* NEW: Modal enhancements */
.modal .btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    font-size: 1.5rem;
    opacity: 0.8;
    z-index: 1050;
}

    .modal .btn-close:hover {
        opacity: 1;
    }

#fullscreenButton {
    display: flex;
    align-items: center;
    gap: 5px;
}
