/**
 * VRC Cloud Instance Manager - Admin UI Styles
 * Additional CSS for enhanced UI components and utilities
 */

/* Theme Variables */
:root {
    --vrc-primary: #8b5cf6;
    --vrc-primary-dark: #7c3aed;
    --vrc-secondary: #1f2937;
    --vrc-background: #111827;
    --vrc-surface: #1f2937;
    --vrc-text: #ffffff;
    --vrc-text-muted: #9ca3af;
    --vrc-border: #374151;
    --vrc-success: #10b981;
    --vrc-error: #ef4444;
    --vrc-warning: #f59e0b;
    --vrc-info: #3b82f6;
}

/* Dark Theme */
[data-theme="dark"] {
    --vrc-background: #111827;
    --vrc-surface: #1f2937;
    --vrc-text: #ffffff;
    --vrc-text-muted: #9ca3af;
    --vrc-border: #374151;
}

/* Light Theme */
[data-theme="light"] {
    --vrc-background: #ffffff;
    --vrc-surface: #f9fafb;
    --vrc-text: #111827;
    --vrc-text-muted: #6b7280;
    --vrc-border: #e5e7eb;
}

/* Base Styles */
body {
    background-color: var(--vrc-background);
    color: var(--vrc-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Modal Styles */
.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--vrc-surface);
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.open .modal-content {
    transform: scale(1);
}

/* Notification Styles */
.notification {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading Spinner */
.spinner {
    border: 2px solid var(--vrc-border);
    border-top: 2px solid var(--vrc-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button Enhancements */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Form Enhancements */
.form-group {
    position: relative;
}

.form-floating-label {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    color: var(--vrc-text-muted);
    transition: all 0.2s ease;
    pointer-events: none;
}

.form-floating-label.active {
    top: -0.5rem;
    left: 0.5rem;
    font-size: 0.75rem;
    color: var(--vrc-primary);
    background-color: var(--vrc-background);
    padding: 0 0.25rem;
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Sidebar Enhancements */
.sidebar-item {
    position: relative;
    transition: all 0.2s ease;
}

.sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: var(--vrc-primary);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.sidebar-item.active::before {
    transform: scaleY(1);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 0.5rem;
    background-color: var(--vrc-border);
    border-radius: 0.25rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--vrc-primary);
    transition: width 0.3s ease;
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-online {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--vrc-success);
}

.status-offline {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--vrc-error);
}

.status-pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--vrc-warning);
}

/* Tooltip Styles */
.tooltip {
    position: absolute;
    z-index: 50;
    padding: 0.5rem 0.75rem;
    background-color: var(--vrc-secondary);
    color: var(--vrc-text);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(1rem);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .notification-container {
        left: 1rem;
        right: 1rem;
        top: 1rem;
    }
}

/* Dark Mode Specific */
[data-theme="dark"] .modal-content {
    border: 1px solid var(--vrc-border);
}

[data-theme="dark"] .tooltip {
    border: 1px solid var(--vrc-border);
}

/* Light Mode Specific */
[data-theme="light"] .modal-content {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .tooltip {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--vrc-border);
}

::-webkit-scrollbar-thumb {
    background: var(--vrc-text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--vrc-primary);
}

/* Focus Styles */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --vrc-border: #000000;
        --vrc-text-muted: #000000;
    }
    
    [data-theme="dark"] {
        --vrc-border: #ffffff;
        --vrc-text-muted: #ffffff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
