/* Files Gallery - Overlays Component Styles */

/* Modal Base */
.fg-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.fg-modal.active {
    opacity: 1;
    visibility: visible;
}

.fg-modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.fg-modal.active .fg-modal-content {
    transform: scale(1);
}

.fg-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fg-modal-title {
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.fg-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.fg-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.fg-modal-body {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
}

.fg-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Context Menu */
.fg-context-menu {
    position: fixed;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-small);
    padding: 8px 0;
    min-width: 200px;
    z-index: 2100;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-soft);
}

.fg-context-menu.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.fg-context-item {
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.fg-context-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fg-context-item i {
    width: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.fg-context-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.fg-context-item.danger {
    color: #ff6b6b;
}

.fg-context-item.danger i {
    color: #ff6b6b;
}

/* Tooltip */
.fg-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    z-index: 2200;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fg-tooltip.active {
    opacity: 1;
}

/* Upload Overlay */
.fg-upload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1900;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.fg-upload-overlay.active {
    opacity: 1;
    visibility: visible;
}

.fg-upload-zone {
    background: white;
    border-radius: var(--border-radius);
    padding: 60px;
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.fg-upload-icon {
    font-size: 64px;
    color: #667eea;
    margin-bottom: 20px;
}

.fg-upload-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.fg-upload-text {
    font-size: 14px;
    color: #666;
}

/* Preview Modal */
.fg-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.fg-preview-modal.active {
    opacity: 1;
    visibility: visible;
}

.fg-preview-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fg-preview-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--border-radius);
}

.fg-preview-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.fg-preview-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.fg-preview-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Progress Bar */
.fg-progress {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 20px;
    min-width: 300px;
    z-index: 1800;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.fg-progress.active {
    transform: translateX(0);
}

.fg-progress-title {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.fg-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}

.fg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.fg-progress-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}

/* ===== CONTEXT MENU ===== */
.fg-context-menu {
    position: fixed;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-small);
    padding: 8px 0;
    min-width: 200px;
    z-index: 2100;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-soft);
}

.fg-context-menu.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.fg-context-item {
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.fg-context-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fg-context-item i {
    width: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.fg-context-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.fg-context-item.danger,
.fg-context-item.danger i {
    color: #ff6b6b;
}