/* Enterprise Media Styles */
.media-files {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 15px 0;
}

.enterprise-media-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.enterprise-media-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.media-preview-section {
    margin-bottom: 15px;
}

/* Image Preview */
.media-preview-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.media-preview-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 1.5rem;
}

.media-preview-image:hover .media-overlay,
.media-preview-video:hover .media-overlay {
    opacity: 1;
}

.media-preview-image:hover img {
    transform: scale(1.05);
}

/* Video Preview */
.media-preview-video {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.media-preview-video img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.video-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

/* Audio Player */
.media-preview-audio {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.audio-player-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.audio-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.audio-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.audio-title {
    font-weight: 500;
    color: var(--dark-color);
}

.custom-audio-player {
    width: 100%;
    height: 40px;
    border-radius: 20px;
}

.custom-audio-player::-webkit-media-controls-panel {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.custom-audio-player::-webkit-media-controls-play-button {
    background-color: white;
    border-radius: 50%;
}

/* PDF Preview */
.media-preview-pdf {
    background: #fff5f5;
    border: 2px dashed #ff6b6b;
    border-radius: 8px;
    padding: 20px;
}

.pdf-preview-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pdf-icon {
    font-size: 3rem;
    color: #dc3545;
}

.pdf-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pdf-title {
    font-weight: 600;
    color: var(--dark-color);
}

.btn-pdf-view {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-pdf-view:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Document Preview */
.media-preview-document {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.document-preview-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.document-icon {
    font-size: 2.5rem;
    color: #6c757d;
}

.document-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.document-type {
    font-weight: 500;
    color: var(--dark-color);
}

.document-format {
    background: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Media Info Section */
.media-info-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.media-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.media-title {
    margin: 0;
    color: var(--dark-color);
    font-weight: 600;
    flex: 1;
}

.media-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.media-badge-image { background: #d4edda; color: #155724; }
.media-badge-video { background: #cce7ff; color: #004085; }
.media-badge-audio { background: #fff3cd; color: #856404; }
.media-badge-document { background: #f8d7da; color: #721c24; }

.media-description {
    margin: 0;
    color: #6c757d;
    line-height: 1.5;
}

.media-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #6c757d;
}

.file-size, .upload-date {
    display: flex;
    align-items: center;
}

.media-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-media-action {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.btn-download-primary {
    background: var(--primary-color);
    color: white;
}

.btn-download-primary:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
}

.btn-audio-download {
    background: #28a745;
    color: white;
}

.btn-audio-download:hover {
    background: #218838;
    color: white;
    transform: translateY(-1px);
}

.btn-preview {
    background: #17a2b8;
    color: white;
}

.btn-preview:hover {
    background: #138496;
    color: white;
    transform: translateY(-1px);
}

/* No Media Placeholder */
.no-media-placeholder {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

/* Responsive Design for Small Screens */
@media (max-width: 576px) {
    .enterprise-media-card {
        padding: 15px;
        margin-bottom: 12px;
    }

    .media-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .media-badge {
        align-self: flex-start;
    }

    .media-meta {
        flex-direction: column;
        gap: 8px;
    }

    .media-actions {
        flex-direction: column;
    }

    .btn-media-action {
        justify-content: center;
    }

    .pdf-preview-wrapper,
    .document-preview-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .media-preview-image img,
    .media-preview-video img,
    .video-placeholder {
        height: 150px;
    }
}

/* GLightbox Customization */
.glightbox-container .gslide-description {
    background: rgba(0,0,0,0.8);
    color: white;
}

.glightbox-container .gclose {
    color: white;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}