/**
 * Version Manager Styles
 * Update notification and version management UI
 */

/* Update Notification */
.update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 320px;
    max-width: 400px;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.update-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.update-notification.hide {
    transform: translateX(120%);
    opacity: 0;
}

.update-content {
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.update-content.updating {
    justify-content: center;
    text-align: center;
}

.update-icon {
    font-size: 24px;
    flex-shrink: 0;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.update-message {
    flex: 1;
    min-width: 0;
}

.update-message h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.update-message p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

.update-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.update-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.update-now {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.update-now:hover {
    background: white;
    transform: translateY(-1px);
}

.update-later {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.update-later:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Update Reminder */
.update-reminder {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: rgba(102, 126, 234, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.reminder-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reminder-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.reminder-btn:hover {
    background: white;
}

.reminder-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.reminder-close:hover {
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .update-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: 0;
    }
    
    .update-content {
        padding: 16px;
        gap: 12px;
    }
    
    .update-actions {
        flex-direction: row;
        min-width: 120px;
    }
    
    .update-btn {
        font-size: 13px;
        padding: 6px 12px;
        min-width: 60px;
    }
    
    .update-reminder {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .reminder-content {
        justify-content: space-between;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .update-notification {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .update-now {
        background: rgba(255, 255, 255, 0.9);
        color: #2d3748;
    }
    
    .update-reminder {
        background: rgba(45, 55, 72, 0.95);
    }
}

/* Animation for updating state */
.updating .update-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Accessibility */
.update-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.reminder-btn:focus,
.reminder-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 1px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .update-notification {
        transition: opacity 0.2s ease;
        transform: none;
    }
    
    .update-notification.show,
    .update-notification.hide {
        transform: none;
    }
    
    .update-icon,
    .updating .update-icon {
        animation: none;
    }
    
    .update-reminder {
        animation: none;
    }
}