.main-container {
  width: 100%;
  padding: 1rem;
  height: calc(100dvh - 10.5rem);
  overflow-y: auto;
  border-width: 1px;
  border-radius: 0.5rem;

  @media (min-width: 768px) {
    height: calc(100dvh - 11.65rem);
  }
}

.enclosing-container {
  border-color: var(--p-content-border-color);
  background: var(--p-content-background);
}

.settings-header {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.settings-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--p-text-color);
  margin: 0 0 0.75rem 0;

  .pi {
    color: var(--p-primary-color);
    font-size: 1.25rem;
  }
}

.settings-description {
  color: var(--p-text-muted-color);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.preferences-section {
  @media (min-width: 768px) {
    padding: 0 1rem;
  }
}

.section-header {
  margin-bottom: 1rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--p-text-color);
  margin: 0 0 0.5rem 0;

  .pi {
    color: var(--p-primary-color);
  }
}

.section-description {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--p-text-muted-color);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;

  .pi {
    color: var(--p-primary-color);
    margin-top: 0.125rem;
    flex-shrink: 0;
  }
}

.settings-card {
  border: 1px solid var(--p-content-border-color);
  border-radius: 8px;
  background: var(--p-content-background);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.auth-control {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-label {
  font-weight: 500;
  color: var(--p-text-color);
  min-width: 6rem;
}

.auth-info {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--p-text-muted-color);
  padding-left: 1rem;

  .pi {
    margin-top: 0.125rem;
    flex-shrink: 0;
  }
}

.auth-status {
  font-size: 0.875rem;
  color: var(--p-text-muted-color);
}

.provider-section,
.provisioning-section {
  margin-top: 1rem;
}

.subsection-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--p-text-color);
  margin-bottom: 1rem;
}

.provider-form,
.provisioning-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

  @media (min-width: 768px) {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  &.form-field-full {
    @media (min-width: 768px) {
      grid-column: 1 / -1;
    }
  }

  label {
    font-weight: 600;
    color: var(--p-text-color);
    font-size: 0.875rem;
  }
}

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

  @media (min-width: 768px) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.field-info {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--p-text-muted-color);
  margin-top: 0.5rem;

  .pi {
    margin-top: 0.125rem;
    flex-shrink: 0;
  }
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 1rem;
}

.permissions-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.permissions-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--p-text-color);
  margin-bottom: 0.5rem;
}

.permissions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-left: 1rem;
}

.permission-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  label {
    font-size: 0.875rem;
    color: var(--p-text-color);
    cursor: pointer;
  }
}

.libraries-section {
  padding-left: 1rem;
  margin-bottom: 1rem;
}
