/**
 * InvitePage Styles
 */

.container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-secondary);
}

.card {
  background: var(--surface-color);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
}

.header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.header p {
  color: var(--text-secondary);
  margin: 0;
}

/* Loading State */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

.loading p {
  margin-top: 1rem;
}

.spinner {
  animation: spin 1s linear infinite;
  font-size: 1.25rem;
}

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

/* Error State */
.errorState {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
}

.errorIcon {
  font-size: 3rem;
  color: var(--danger-color, #e53e3e);
  margin-bottom: 1rem;
}

.errorState h1 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.errorState p {
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
}

/* Success State */
.successState {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
}

.successIcon {
  font-size: 3rem;
  color: var(--success-color, #38a169);
  margin-bottom: 1rem;
}

.successState h1 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.successState p {
  color: var(--text-secondary);
  margin: 0;
}

/* Invite Info */
.inviteInfo {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.infoRow {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.infoRow:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.infoLabel {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.infoValue {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

/* Error Message */
.errorMessage {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(229, 62, 62, 0.1);
  color: var(--danger-color, #e53e3e);
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.formRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.formGroup {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.formGroup label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.formGroup label svg {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.formGroup input {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.formGroup input:focus {
  outline: none;
  border-color: var(--primary-color, #f25843);
  box-shadow: 0 0 0 3px rgba(242, 88, 67, 0.1);
}

.formGroup input::placeholder {
  color: var(--text-tertiary);
}

/* Actions */
.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.primaryButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color, #f25843);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  text-align: center;
}

.primaryButton:hover {
  background: var(--primary-dark, #d94d3a);
}

.primaryButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.secondaryButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
  text-align: center;
}

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

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.divider span {
  padding: 0 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Login Option */
.loginOption {
  text-align: center;
}

.loginOption p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0 0 0.75rem 0;
}

/* Auth Prompt (for unauthenticated users) */
.authPrompt {
  text-align: center;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.authPrompt p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.9rem;
}

.authActions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.authInfo {
  text-align: center;
  padding: 1rem;
  margin-top: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.authInfo p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.5;
}

.redirectMessage {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 0.5rem !important;
}

/* Responsive */
@media (max-width: 500px) {
  .card {
    padding: 1.5rem;
  }

  .formRow {
    grid-template-columns: 1fr;
  }
}

/* Dark theme */
:global(.dark-theme) .card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
