@use '../styles/mixins' as *;

.container {
  width: 100%;
}

.cardTitle {
  display: flex;
  align-items: center;
  gap: $spacing-sm;
}

.cardTitleIcon {
  width: 24px;
  height: 24px;
}

.pageTitle {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 $spacing-xl 0;
}

.content {
  display: flex;
  flex-direction: column;
  gap: $spacing-xl;
}

.oauthSection {
  display: flex;
  flex-direction: column;
  gap: $spacing-lg;
}

.oauthGrid {
  display: grid;
  gap: $spacing-lg;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));

  @include mobile {
    grid-template-columns: 1fr;
  }
}

.oauthCard {
  display: flex;
  flex-direction: column;
  gap: $spacing-md;
}

.oauthStatus {
  padding: $spacing-md;
  border-radius: $radius-md;
  font-size: 14px;

  &.success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #16a34a;
  }

  &.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
  }

  &.waiting {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
  }
}

.callbackSection {
  margin-top: $spacing-md;
  display: flex;
  flex-direction: column;
  gap: $spacing-xs;
}

.callbackActions {
  display: flex;
  gap: $spacing-md;
}

.authUrlBox {
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: $radius-md;
  padding: $spacing-md;
  display: flex;
  flex-direction: column;
  gap: $spacing-xs;
}

.authUrlLabel {
  color: var(--text-secondary);
  font-size: 14px;
}

.authUrlValue {
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 1.5;
  max-width: 100%;
}

.authUrlActions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: $spacing-sm;
  margin-top: $spacing-sm;
}

.geminiProjectField {
  :global(.form-group) {
    margin-top: $spacing-sm;
    gap: $spacing-sm;
  }
}

.filePicker {
  display: flex;
  align-items: center;
  gap: $spacing-sm;
  flex-wrap: wrap;
}

.fileName {
  flex: 1;
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: $radius-md;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
}

.fileNamePlaceholder {
  color: var(--text-secondary);
}
