:root {
  /* Default OAuth colors if provider specific isn't set */
  --oauth-brand-primary: #0366d6;
  --oauth-brand-text: #ffffff;
  --oauth-brand-secondary: #f5f5f5;
}

/* Provider-specific branding */
.mo-device-flow[data-provider='github'] {
  --oauth-brand-primary: #24292e;
  --oauth-brand-text: #ffffff;
}

.mo-device-flow[data-provider='google'] {
  --oauth-brand-primary: #4285f4;
  --oauth-brand-text: #ffffff;
}

.mo-device-flow[data-provider='microsoft'] {
  --oauth-brand-primary: #00a4ef;
  --oauth-brand-text: #ffffff;
}

.mo-device-flow[data-provider='amazon'] {
  --oauth-brand-primary: #ff9900;
  --oauth-brand-text: #000000;
}

.mo-device-flow[data-provider='facebook'] {
  --oauth-brand-primary: #1877f2;
  --oauth-brand-text: #ffffff;
}

.mo-device-flow[data-provider='twitter'] {
  --oauth-brand-primary: #1da1f2;
  --oauth-brand-text: #ffffff;
}

.mo-device-flow {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #333;
  max-width: 450px;
  margin: 1rem auto;
  padding: 1rem;
  background-color: #fff;
  border-radius: 6px;
  border: 1px solid #eaeaea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.title {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  text-align: center;
  color: var(--oauth-brand-primary);
}

.section {
  width: 100%;
  text-align: center;
}

.section-title {
  margin-bottom: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 0.5rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 200px;
}

.btn-primary {
  background-color: var(--oauth-brand-primary);
  color: var(--oauth-brand-text);
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(1px);
}

.spinner {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Verification section styles */
.verification-section {
  display: none;
  padding: 0.5rem;
  border: 1px solid #eaeaea;
  border-radius: 6px;
  background-color: #fafafa;
}

.instruction-text {
  margin-bottom: 0.75rem;
}

.user-code {
  font-size: 1.75rem;
  font-weight: bold;
  letter-spacing: 3px;
}

.user-code-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.75rem auto;
  max-width: 250px;
  padding: 0.75rem;
  gap: 0.5rem;
  background-color: var(--oauth-brand-secondary, #f5f5f5);
  border-radius: 4px;
  border: 1px solid #eaeaea;
}

.copy-btn {
  background: transparent;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  color: var(--oauth-brand-primary);
  background-color: rgba(0, 0, 0, 0.05);
}

.copy-btn.copied {
  color: #198754;
  background-color: rgba(25, 135, 84, 0.1);
}

.copy-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.expiry-timer {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.instructions {
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.steps {
  text-align: left;
  padding-left: 0.5rem;
  margin: 0.5rem 0;
}

.steps li {
  margin-bottom: 0.5rem;
}

.verify-link {
  color: var(--oauth-brand-primary);
  font-weight: 500;
  text-decoration: none;
}

.verify-link:hover {
  text-decoration: underline;
}

.link-button {
  color: var(--oauth-brand-primary);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
}

.link-button:hover {
  text-decoration: underline;
}

.status-message {
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Token section styles */
.token-section {
  display: none;
}

.success-container {
  padding: 0.5rem;
  background-color: #f8fffa;
  border-radius: 4px;
  border: 1px solid #d1e7dd;
}

.success {
  color: #198754;
}

.success-text {
  margin-bottom: 0.5rem;
}

.error {
  color: #dc3545;
  font-weight: 500;
}
