/**
 * GuruSinergi Integration Styles
 * File: gs-integration-style.css
 * Deskripsi: CSS untuk tampilan terintegrasi
 * Versi: 1.0.0
 */

/* Gaya Umum */
.gs-integration-wrapper {
    margin: 20px 0;
}

/* Badge dan Label */
.gs-source-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 5px;
}

.gs-source-badge.uploader {
    background-color: #f59e0b;
    color: white;
}

.gs-source-badge.admin {
    background-color: #10b981;
    color: white;
}

/* Tombol */
.gs-sync-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    background-color: #4F46E5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.gs-sync-button:hover {
    background-color: #4338CA;
}

.gs-sync-button.loading {
    opacity: 0.7;
    cursor: wait;
}

.gs-sync-button.success {
    background-color: #10b981;
}

.gs-sync-button.error {
    background-color: #ef4444;
}

.gs-sync-button .spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: gs-spin 1s ease-in-out infinite;
    margin-right: 5px;
}

@keyframes gs-spin {
    to { transform: rotate(360deg); }
}

/* Tampilan File di Marketplace */
.material-file-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.material-file-section h3 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
}

.file-info {
    background: white;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border: 1px solid #eee;
}

.file-info p {
    margin: 5px 0;
}

.download-button-container {
    text-align: center;
    margin-top: 20px;
}

.download-button {
    display: inline-block;
    padding: 10px 20px;
    background: #4F46E5;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.download-button:hover {
    background: #4338CA;
    color: white;
    text-decoration: none;
}

/* Tab File */
.file-tab-content {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.file-header {
    display: flex;
    margin-bottom: 20px;
}

.file-icon {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-icon svg,
.file-icon img {
    max-width: 100%;
    max-height: 100%;
}

.file-title h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.file-description {
    color: #666;
    margin: 0;
}

.file-details {
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #eee;
}

.file-info-table {
    width: 100%;
    border-collapse: collapse;
}

.file-info-table th, 
.file-info-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.file-info-table th {
    width: 30%;
    color: #333;
    font-weight: 600;
}

.file-actions {
    text-align: center;
    margin-top: 20px;
}

/* Notifikasi */
.gs-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-left: 4px solid #4F46E5;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 300px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gs-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.gs-notification.success {
    border-left-color: #10b981;
}

.gs-notification.error {
    border-left-color: #ef4444;
}

/* Panel Uploader */
.gs-uploader-form .integration-options {
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-top: 15px;
}

.gs-uploader-form .integration-options h3 {
    margin-top: 0;
    font-size: 16px;
    color: #333;
}

.gs-uploader-form .form-check {
    margin-bottom: 10px;
}

/* Admin Integration Panel */
.gs-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 20px;
    margin: 20px 0;
}

.gs-stat-box {
    background: white;
    border: 1px solid #e5e5e5;
    padding: 15px;
    text-align: center;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.gs-stat-box h3 {
    margin: 0 0 10px 0;
    color: #23282d;
}

.gs-stat-number {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
    color: #4F46E5;
}

.gs-integration-actions {
    background: white;
    border: 1px solid #e5e5e5;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.gs-materials-table {
    margin-top: 20px;
    background: white;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.gs-materials-table th {
    font-weight: bold;
}

.gs-file-link {
    display: block;
    margin-top: 5px;
    color: #4F46E5;
}

.gs-file-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* Progress Bar */
.gs-sync-progress {
    margin-top: 10px;
    height: 20px;
    background-color: #f1f1f1;
    border-radius: 3px;
    overflow: hidden;
}

.gs-sync-progress-bar {
    height: 100%;
    background-color: #4F46E5;
    width: 0%;
    transition: width 0.3s ease;
}

/* File Info in Admin */
.gs-file-info {
    background: #f5f5f5;
    padding: 10px;
    border: 1px solid #e5e5e5;
    margin-top: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gs-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .file-header {
        flex-direction: column;
    }
    
    .file-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .file-info-table th {
        width: 40%;
    }
    
    .gs-notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

/* Tooltips */
.gs-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.gs-tooltip .gs-tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.gs-tooltip:hover .gs-tooltip-text {
    visibility: visible;
    opacity: 1;
}