/* Utilities CSS - Common utilities, focus states, accessibility, script.js styles */

/* Enhanced focus states and accessibility */
.chip:focus,
.toggle-option:focus,
.analyze-btn:focus,
.optional-text-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.3);
}

/* Loading state styles */
.loading-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.loading-icon {
  font-size: 1.2em;
}

/* Warning styles */
.warning-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.warning-icon {
  font-size: 1.2em;
}

.warning-title {
  color: #d32f2f;
}

.warning-text {
  margin-bottom: 10px;
}

.warning-highlight {
  background: rgba(255, 152, 0, 0.1);
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.warning-remember {
  font-size: 0.9em;
  color: #666;
}

/* Rating display styles */
.rating-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.rating-icon {
  font-size: 1.2em;
}

.advice-text {
  margin-bottom: 12px;
}

.swap-container {
  background: rgba(255, 154, 158, 0.1);
  padding: 10px;
  border-radius: 8px;
}

/* Error state styles */
.error-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.error-icon {
  font-size: 1.2em;
}

.error-text {
  margin-bottom: 12px;
}

/* Recommendation styles */
.recommendation-item {
  margin-bottom: 10px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
}

/* Locked feature notification styles */
.locked-feature-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.locked-feature-icon {
  font-size: 1.2em;
}

/* Profile update notification */
.profile-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, #4caf50, #8bc34a);
  color: white;
  padding: 15px 25px;
  border-radius: 25px;
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
  max-width: 90%;
  text-align: center;
}

.profile-notification.show {
  transform: translateX(-50%) translateY(0);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.notification-icon {
  font-size: 1.5em;
}

.notification-text {
  font-size: 0.95em;
  line-height: 1.4;
}

/* Coming Soon Popup */
.coming-soon-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.coming-soon-popup.show {
  opacity: 1;
}

.coming-soon-content {
  background: white;
  border-radius: 20px;
  padding: 30px;
  max-width: 90%;
  width: 400px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.8);
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.coming-soon-popup.show .coming-soon-content {
  transform: scale(1);
}

.coming-soon-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff9a9e, #fecfef, #4caf50);
  border-radius: 20px 20px 0 0;
}

.coming-soon-header {
  margin-bottom: 20px;
}

.coming-soon-icon {
  font-size: 3em;
  display: block;
  margin-bottom: 15px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.coming-soon-header h3 {
  color: #5d4037;
  font-size: 1.4em;
  font-weight: 700;
  margin: 0;
}

.coming-soon-message {
  color: #666;
  line-height: 1.6;
  margin-bottom: 25px;
  font-size: 1em;
}

.coming-soon-close {
  background: linear-gradient(135deg, #6a5acd, #9370db);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(106, 90, 205, 0.3);
}

.coming-soon-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(106, 90, 205, 0.4);
}

/* Demo Popup */
.demo-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.demo-popup.show {
  opacity: 1;
}

.demo-content {
  background: white;
  border-radius: 20px;
  padding: 30px;
  max-width: 90%;
  width: 400px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.8);
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.demo-popup.show .demo-content {
  transform: scale(1);
}

.demo-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff9800, #ffc107, #ff9800);
  border-radius: 20px 20px 0 0;
}

.demo-header {
  margin-bottom: 20px;
}

.demo-icon {
  font-size: 3em;
  display: block;
  margin-bottom: 15px;
  animation: demoPulse 2s ease-in-out infinite;
}

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

.demo-header h3 {
  color: #e65100;
  font-size: 1.4em;
  font-weight: 700;
  margin: 0;
}

.demo-message {
  color: #666;
  line-height: 1.6;
  margin-bottom: 25px;
  font-size: 1em;
}

.demo-close {
  background: linear-gradient(135deg, #ff9800, #ffc107);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.demo-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

/* Responsive utilities */
@media (max-width: 480px) {
  .loading-container,
  .warning-header,
  .rating-container,
  .error-container,
  .locked-feature-container {
    gap: 8px;
  }

  .loading-icon,
  .warning-icon,
  .rating-icon,
  .error-icon,
  .locked-feature-icon {
    font-size: 1.1em;
  }

  .warning-text,
  .advice-text,
  .error-text {
    font-size: 0.9em;
  }

  .recommendation-item {
    padding: 8px;
    font-size: 0.9em;
  }

  .coming-soon-content {
    padding: 25px 20px;
    width: 90%;
  }

  .coming-soon-header h3 {
    font-size: 1.2em;
  }

  .coming-soon-message {
    font-size: 0.9em;
  }

  .demo-content {
    padding: 25px 20px;
    width: 90%;
  }

  .demo-header h3 {
    font-size: 1.2em;
  }

  .demo-message {
    font-size: 0.9em;
  }
}
