/**
 * SlidevControls Component Styles
 *
 * Matches the existing demo-experience-ui design system:
 * - Dark theme with #0a0a0a background
 * - White text with varying opacity for hierarchy
 * - Blue accent color (#3b82f6) for primary actions
 * - Rounded buttons with hover effects
 * - Loading spinner animations
 */

/* Container */
.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 24px;
}

.content {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Title */
.title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  text-align: center;
}

/* Generate Section */
.generateSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.description {
  font-size: 15px;
  color: #a0a0a0;
  margin: 0;
  line-height: 1.5;
}

.generateButton {
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 200ms ease, transform 100ms ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.generateButton:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.generateButton:active {
  transform: translateY(0);
}

.buttonIcon {
  display: flex;
  align-items: center;
}

/* Loading Section */
.loadingSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loadingMessage {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  margin: 0;
}

.loadingSubtext {
  font-size: 14px;
  color: #a0a0a0;
  margin: 0;
  text-align: center;
  max-width: 400px;
}

/* Ready Section */
.readySection {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.deckInfo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
}

.successIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.successMessage {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.deckLink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #3b82f6;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: background 200ms ease, transform 100ms ease;
}

.deckLink:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.deckLink:active {
  transform: translateY(0);
}

.linkIcon {
  display: flex;
  align-items: center;
}

/* Controls Section */
.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.controlsLabel {
  font-size: 14px;
  font-weight: 500;
  color: #a0a0a0;
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.controlButtons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.controlButton {
  flex: 1;
  max-width: 140px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, transform 100ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.controlButton:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.controlButton:active:not(:disabled) {
  transform: translateY(0);
}

.controlButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.controlIcon {
  display: flex;
  align-items: center;
}

/* Error Section */
.errorSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  text-align: center;
}

.errorIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.errorTitle {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.errorMessage {
  font-size: 15px;
  color: #a0a0a0;
  margin: 0;
  line-height: 1.5;
  max-width: 400px;
}

.retryButton {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, transform 100ms ease;
  margin-top: 8px;
}

.retryButton:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.retryButton:active {
  transform: translateY(0);
}

/* Inline Error (for control errors) */
.inlineError {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  color: #ef4444;
  font-size: 14px;
  line-height: 1.5;
}

.inlineErrorIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

/* Responsive: Tablet */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

  .content {
    padding: 24px;
  }

  .title {
    font-size: 18px;
  }

  .controlButtons {
    flex-direction: column;
    width: 100%;
  }

  .controlButton {
    max-width: none;
  }
}

/* Responsive: Mobile */
@media (max-width: 480px) {
  .container {
    padding: 12px;
  }

  .content {
    padding: 20px;
    gap: 20px;
  }

  .title {
    font-size: 16px;
  }

  .generateButton {
    font-size: 15px;
    padding: 12px 24px;
  }

  .spinner {
    width: 40px;
    height: 40px;
  }

  .loadingMessage {
    font-size: 15px;
  }

  .loadingSubtext {
    font-size: 13px;
  }

  .successIcon,
  .errorIcon {
    width: 40px;
    height: 40px;
  }

  .successMessage,
  .errorTitle {
    font-size: 16px;
  }

  .description,
  .errorMessage {
    font-size: 14px;
  }

  .controlButton {
    font-size: 14px;
    padding: 10px 16px;
  }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
    border-top-color: #3b82f6;
    border-right-color: #3b82f6;
  }

  .generateButton,
  .deckLink,
  .controlButton,
  .retryButton {
    transition: none;
  }

  .generateButton:hover,
  .deckLink:hover,
  .controlButton:hover,
  .retryButton:hover {
    transform: none;
  }
}
