/**
 * 🎵 Gordy Assistant User Interface Styles
 * Beautiful onboarding and user management components
 * Preserving the existing aesthetic while layering new functionality
 */

/* ===== WELCOME ONBOARDING OVERLAY ===== */
.welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    var(--electric-purple) 0%, 
    var(--acid-teal) 50%, 
    var(--soft-coral) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.5s ease;
  backdrop-filter: blur(10px);
}

.welcome-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: welcomeCardIn 0.8s ease-out;
}

@keyframes welcomeCardIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logo-animation {
  position: relative;
  margin-bottom: 30px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-note {
  font-size: 3rem;
  animation: musicNoteFloat 2s ease-in-out infinite;
}

.sparkle {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  animation: sparkleRotate 3s linear infinite;
}

@keyframes musicNoteFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes sparkleRotate {
  0% { transform: rotate(0deg) scale(1); opacity: 0.8; }
  50% { transform: rotate(180deg) scale(1.2); opacity: 1; }
  100% { transform: rotate(360deg) scale(1); opacity: 0.8; }
}

.welcome-title {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--off-white);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
  animation: letterGlow 3s ease-in-out infinite;
}

@keyframes letterGlow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
  }
  50% {
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.6), 0 0 30px rgba(168, 85, 247, 0.4);
  }
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 30px;
  line-height: 1.5;
}

.onboarding-form {
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.name-input, .email-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: var(--font-primary);
}

.name-input:focus, .email-input:focus {
  outline: none;
  border-color: var(--electric-purple);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
  background: var(--bg-primary);
}

.continue-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--electric-purple), var(--acid-teal));
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  font-family: var(--font-primary);
}

.continue-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.continue-btn:active {
  transform: translateY(0);
}

/* ===== USER HEADER ===== */
.user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
  animation: slideInFromTop 0.6s ease-out;
}

@keyframes slideInFromTop {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-greeting {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.greeting-text {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
}

.user-menu {
  display: flex;
  gap: 12px;
  align-items: center;
}

.user-menu-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
}

.user-menu-btn:hover {
  background: var(--electric-purple);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.user-avatar {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--electric-purple), var(--acid-teal));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.menu-icon {
  font-size: 1.2rem;
}

/* ===== FLOATING ACTION BUTTON ===== */
.floating-actions {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.fab-main {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--electric-purple), var(--acid-teal));
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  position: relative;
}

.fab-main:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-xl);
}

.fab-main-active {
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--soft-coral), var(--electric-purple));
}

.fab-menu {
  position: absolute;
  bottom: 70px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.fab-menu-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fab-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  min-width: 120px;
}

.fab-item:hover {
  background: var(--electric-purple);
  color: white;
  transform: translateX(-5px);
  box-shadow: var(--shadow-lg);
}

.fab-icon {
  font-size: 1.1rem;
}

.fab-text {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== SAVE INDICATOR ===== */
.save-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--electric-purple), var(--acid-teal));
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1001;
  animation: saveIndicatorIn 0.3s ease-out;
  box-shadow: var(--shadow-lg);
  display: none;
}

@keyframes saveIndicatorIn {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.save-icon {
  margin-right: 8px;
  animation: saveIconPulse 1s ease-in-out infinite;
}

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

/* ===== NOTIFICATIONS ===== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  color: white;
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 1002;
  animation: notificationSlideIn 0.3s ease-out;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 300px;
  transition: opacity 0.3s ease;
}

@keyframes notificationSlideIn {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.notification-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.notification-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification-info {
  background: linear-gradient(135deg, var(--electric-purple), var(--acid-teal));
}

.notification-icon {
  font-size: 1.1rem;
}

.notification-text {
  flex: 1;
  line-height: 1.4;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .welcome-card {
    padding: 30px 20px;
    margin: 20px;
  }
  
  .welcome-title {
    font-size: 1.8rem;
  }
  
  .user-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .user-greeting {
    align-items: center;
  }
  
  .floating-actions {
    bottom: 20px;
    right: 20px;
  }
  
  .fab-main {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  
  .fab-menu {
    bottom: 60px;
  }
  
  .notification {
    left: 20px;
    right: 20px;
    max-width: none;
  }
  
  .save-indicator {
    left: 20px;
    right: 20px;
    text-align: center;
  }
}

/* ===== PERSONALIZED PLACEHOLDERS ===== */
.input-field::placeholder {
  color: var(--text-tertiary);
  font-style: italic;
}

.input-field:focus::placeholder {
  opacity: 0.6;
}

/* ===== SMOOTH TRANSITIONS FOR EXISTING ELEMENTS ===== */
.tab-content {
  transition: all 0.3s ease;
}

.card {
  transition: all 0.3s ease;
}

/* ===== ENHANCED EXISTING STYLES ===== */
.container {
  position: relative;
  transition: all 0.3s ease;
}

/* Add subtle animations to existing chat elements */
.message {
  animation: messageSlideIn 0.4s ease-out;
}

@keyframes messageSlideIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced loading states */
.loading-container {
  position: relative;
}

.loading-spinner {
  animation: spinFloat 2s ease-in-out infinite;
}

@keyframes spinFloat {
  0%, 100% { 
    transform: rotate(0deg) translateY(0px); 
  }
  25% { 
    transform: rotate(90deg) translateY(-2px); 
  }
  50% { 
    transform: rotate(180deg) translateY(0px); 
  }
  75% { 
    transform: rotate(270deg) translateY(-2px); 
  }
}

/* Enhanced focus states for accessibility */
.user-menu-btn:focus,
.fab-main:focus,
.fab-item:focus,
.continue-btn:focus {
  outline: 2px solid var(--electric-purple);
  outline-offset: 2px;
}

/* Dark mode adjustments (if needed) */
@media (prefers-color-scheme: dark) {
  .welcome-overlay {
    background: linear-gradient(135deg, 
      rgba(168, 85, 247, 0.9) 0%, 
      rgba(20, 184, 166, 0.9) 50%, 
      rgba(251, 146, 60, 0.9) 100%);
  }
}

/* Print styles (hide user interface elements) */
@media print {
  .user-header,
  .floating-actions,
  .save-indicator,
  .notification,
  .welcome-overlay {
    display: none !important;
  }
}

/* Module Switch Dialog */
.module-switch-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dialogFadeIn 0.3s ease-out;
}

.dialog-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.dialog-content {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
  animation: dialogSlideIn 0.3s ease-out;
}

.dialog-header h3 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 600;
}

.dialog-header p {
  margin: 0 0 16px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.conversation-preview {
  background: var(--dark-canvas);
  border-radius: 8px;
  padding: 12px;
  margin: 16px 0;
  border-left: 3px solid var(--electric-purple);
}

.conversation-preview strong {
  color: var(--text-primary);
  font-size: 0.9rem;
}

.preview-text {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 4px;
  line-height: 1.4;
}

.dialog-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.dialog-actions .btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.9rem;
}

.dialog-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Dialog-specific button overrides */
.dialog-actions .btn-primary {
  background: linear-gradient(135deg, var(--electric-purple), var(--acid-teal));
  color: white;
}

.dialog-actions .btn-primary:hover {
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.dialog-actions .btn-secondary {
  background: var(--soft-gray);
  color: var(--text-primary);
}

.dialog-actions .btn-secondary:hover {
  background: var(--border-color);
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-cancel:hover {
  background: var(--card-bg);
  border-color: var(--text-secondary);
}

/* Dialog Animations */
@keyframes dialogFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dialogSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile responsive for dialog */
@media (max-width: 768px) {
  .dialog-content {
    margin: 20px;
    padding: 20px;
    max-width: none;
    width: calc(100% - 40px);
  }
  
  .dialog-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .dialog-actions .btn {
    width: 100%;
  }
} 